Documentation ¶
Overview ¶
Logger
Index ¶
Constants ¶
View Source
const ( // Zap implementation Zap int = iota // Logrus implementation Logrus )
View Source
const ( // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FATAL_LEVEL int = iota // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ERROR_LEVEL // WarnLevel level. Non-critical entries that deserve eyes. WARN_LEVEL // InfoLevel level. General operational entries about what's going on inside the // application. INFO_LEVEL // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DEBUG_LEVEL )
The severity levels. Higher values are more considered more important.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration - options for logger
type Logger ¶
type Logger interface { Fatal(msg string, fields ...field.Fields) FatalWithContext(ctx context.Context, msg string, fields ...field.Fields) Error(msg string, fields ...field.Fields) ErrorWithContext(ctx context.Context, msg string, fields ...field.Fields) Warn(msg string, fields ...field.Fields) WarnWithContext(ctx context.Context, msg string, fields ...field.Fields) Info(msg string, fields ...field.Fields) InfoWithContext(ctx context.Context, msg string, fields ...field.Fields) Debug(msg string, fields ...field.Fields) DebugWithContext(ctx context.Context, msg string, fields ...field.Fields) Get() interface{} // Closer is the interface that wraps the basic Close method. io.Closer // contains filtered or unexported methods }
Logger is our contract for the logger
Click to show internal directories.
Click to hide internal directories.