Documentation
¶
Index ¶
- Constants
- func CreateJsonLogger(opts ...Option) (interfaces.Logger, error)
- type Level
- type Option
- func WithFields(fields map[string]string) Option
- func WithFile(filePath string, maxSize, maxBackups, maxAge int) Option
- func WithLevel(level Level) Option
- func WithOutputInConsole() Option
- func WithSeparateErrorFile(filePath string, maxSize, maxBackups, maxAge int) Option
- func WithTimeLayout(timeLayout string) Option
Constants ¶
View Source
const ( DefaultLevel = zapcore.InfoLevel DefaultTimeLayout = time.RFC3339 )
Variables ¶
This section is empty.
Functions ¶
func CreateJsonLogger ¶
func CreateJsonLogger(opts ...Option) (interfaces.Logger, error)
Types ¶
type Level ¶
type Level int8
const ( DebugLevel Level = iota - 1 // InfoLevel is the default logging priority. InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. DPanicLevel // PanicLevel logs a message, then panics. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
Click to show internal directories.
Click to hide internal directories.