Documentation ¶
Index ¶
- Constants
- Variables
- func NewDevelopmentSugarLogger(pathsToLogs []string) (*zap.SugaredLogger, error)
- func NewEnvironmentSugarLogger(environment string, pathsToLogs []string) (*zap.SugaredLogger, error)
- func NewLogger(logLevel string, pathsToLogs []string, encoding string) (*zap.Logger, error)
- func NewProductionSugarLogger(pathsToLogs []string) (*zap.SugaredLogger, error)
- func NewSugarLogger(logLevel string, pathsToLogs []string, encoding string) (*zap.SugaredLogger, error)
Constants ¶
View Source
const ( Development = "development" Production = "production" )
Variables ¶
View Source
var LevelNamesMap = map[string]zapcore.Level{ "debug": zapcore.DebugLevel, "info": zapcore.InfoLevel, "warn": zapcore.WarnLevel, "error": zapcore.ErrorLevel, "dpanic": zapcore.DPanicLevel, "panic": zapcore.PanicLevel, "fatal": zapcore.FatalLevel, }
LevelNamesMap stores mapping from string loglevel to zapcore.Level
Functions ¶
func NewDevelopmentSugarLogger ¶
func NewDevelopmentSugarLogger(pathsToLogs []string) (*zap.SugaredLogger, error)
NewDevelopmentSugarLogger creates new zap.SugaredLogger to use it during development
func NewEnvironmentSugarLogger ¶
func NewEnvironmentSugarLogger(environment string, pathsToLogs []string) (*zap.SugaredLogger, error)
NewEnvironmentSugarLogger creates new zap.SugaredLogger for environment
func NewProductionSugarLogger ¶
func NewProductionSugarLogger(pathsToLogs []string) (*zap.SugaredLogger, error)
NewProductionSugarLogger creates new zap.SugaredLogger to use it in production
func NewSugarLogger ¶
func NewSugarLogger(logLevel string, pathsToLogs []string, encoding string) (*zap.SugaredLogger, error)
NewSugarLogger creates new zap.SugaredLogger
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.