Documentation
¶
Index ¶
- Constants
- func RFC3339nanoTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- type LogConfig
- type Logger
- func (l *Logger) Create() *Logger
- func (l *Logger) CreateWithoutPool() *Logger
- func (l *Logger) DisableFile() *Logger
- func (l *Logger) OutputWriters() []io.Writer
- func (l *Logger) SetAge(days int) *Logger
- func (l *Logger) SetBufferLimit(cacheLimit int) *Logger
- func (l *Logger) SetLevelDebug()
- func (l *Logger) SetLevelError()
- func (l *Logger) SetLevelInfo()
- func (l *Logger) SetLevelWarn()
- func (l *Logger) SetNumber(count int) *Logger
- func (l *Logger) SetSize(mega int) *Logger
Constants ¶
View Source
const ( EOF_MSG = "_EOF_MSG" EOF_KEY = "_EOF_KEY" EOF_VALUE = "_EOF_VALUE" )
Variables ¶
This section is empty.
Functions ¶
func RFC3339nanoTimeEncoder ¶
func RFC3339nanoTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type LogConfig ¶
type LogConfig struct { // Logger Level Level string // Print log on console PrintLog bool // EncodeLogsAsJson makes the log framework log JSON EncodeLogsAsJson bool // FileLognodosagEnabled makes the framework log to a file // the fields below can be skipped if this value is false! FileLognodosagEnabled bool // Directory to log to to when filelognodosag is enabled Directory string // Filename is the name of the logfile which will be placed inside the directory Filename string // MaxSize the max size in MB of the logfile before it's rolled MaxSize int // MaxBackups the max number of rolled files to keep MaxBackups int // MaxAge the max age in days to keep a logfile MaxAge int }
Configuration for lognodosag
type Logger ¶
type Logger struct { *zap.SugaredLogger // contains filtered or unexported fields }
func (*Logger) CreateWithoutPool ¶
func (*Logger) DisableFile ¶
func (*Logger) OutputWriters ¶
func (*Logger) SetBufferLimit ¶
func (*Logger) SetLevelDebug ¶
func (l *Logger) SetLevelDebug()
func (*Logger) SetLevelError ¶
func (l *Logger) SetLevelError()
func (*Logger) SetLevelInfo ¶
func (l *Logger) SetLevelInfo()
func (*Logger) SetLevelWarn ¶
func (l *Logger) SetLevelWarn()
Click to show internal directories.
Click to hide internal directories.