Documentation
¶
Overview ¶
Package zzzlog provides a minimalistic level logging library based on the zzzlogi level logging interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.2.0
type Config struct { // Dest is the logging destination for the logs. Dest io.Writer // Level determines the maximum logging level. MaxLevel Level // SkipTimestamp set to true skips logging the timestamp in the logs. SkipTimestamp bool // SkipLogLevel seto to true skips logging the log level in the logs. SkipLogLevel bool // SkipCallerInfo set to true skips logging the call site information. SkipCallerInfo bool // PanicInFatal set to true causes the log message to be emitted // through panic() after logging, instead of the default behavior of // exiting with a status code 1 when using Fatal or FatalF logging methods. PanicInFatal bool // TimestampLoggingFormat determines the format for logging the timestamps. TimestampLoggingFormat string }
Config contains the configuration for the logger.
func NewConsoleLoggerConfig ¶ added in v0.2.1
func NewConsoleLoggerConfig() *Config
NewConsoleLoggerConfig returns a logger configuration for logging to stdout with the maximum logging level set to Info.
func NewVanillaLoggerConfig ¶ added in v0.3.2
func NewVanillaLoggerConfig() *Config
type Level ¶ added in v0.2.0
type Level uint8
Level represents the logging level used by the zzzlog logger.
const ( // LvlFatal represents the Fatal log level. LvlFatal Level = iota // LvlError represents the Error log level. LvlError // LvlWarn represents the Warn log level. LvlWarn // LvlInfo represents the Info log level. LvlInfo // LvlDebug represents the Debug log level. LvlDebug // LvlTrace represents the Trace log level. LvlTrace )
Logging levels used by the zzzlog logger.
Click to show internal directories.
Click to hide internal directories.