Versions in this module Expand all Collapse all v1 v1.0.0 Dec 21, 2023 Changes in this version + const LogFlagLongFile + const LogFlagShortFile + var BackendLog = NewBackend() + func InitLog(logFile, errLogFile string) + func InitLogStdout(logLevel Level) + func LogAndMeasureExecutionTime(log *Logger, functionName string) (onEnd func()) + func LogMemoryStats(log *Logger, functionName string) + func ParseAndSetLogLevels(logLevel string) error + func SetLogLevel(subsystemID string, logLevel string) error + func SetLogLevels(logLevel Level) + func SetLogLevelsString(logLevel string) error + func SupportedSubsystems() []string + type Backend struct + func NewBackend() *Backend + func NewBackendWithFlags(flags uint32) *Backend + func (b *Backend) AddLogFile(logFile string, logLevel Level) error + func (b *Backend) AddLogFileWithCustomRotator(logFile string, logLevel Level, thresholdKB int64, maxRolls int) error + func (b *Backend) AddLogWriter(logWriter io.WriteCloser, logLevel Level) error + func (b *Backend) Close() + func (b *Backend) IsRunning() bool + func (b *Backend) Logger(subsystemTag string) *Logger + func (b *Backend) Run() error + type Level uint32 + const LevelCritical + const LevelDebug + const LevelError + const LevelInfo + const LevelOff + const LevelTrace + const LevelWarn + func LevelFromString(s string) (l Level, ok bool) + func (l Level) String() string + type LogClosure func() string + func NewLogClosure(c func() string) LogClosure + func (c LogClosure) String() string + type Logger struct + func RegisterSubSystem(subsystem string) *Logger + func (l *Logger) Backend() *Backend + func (l *Logger) Critical(args ...interface{}) + func (l *Logger) Criticalf(format string, args ...interface{}) + func (l *Logger) Debug(args ...interface{}) + func (l *Logger) Debugf(format string, args ...interface{}) + func (l *Logger) Error(args ...interface{}) + func (l *Logger) Errorf(format string, args ...interface{}) + func (l *Logger) Info(args ...interface{}) + func (l *Logger) Infof(format string, args ...interface{}) + func (l *Logger) Level() Level + func (l *Logger) SetLevel(level Level) + func (l *Logger) Trace(args ...interface{}) + func (l *Logger) Tracef(format string, args ...interface{}) + func (l *Logger) Warn(args ...interface{}) + func (l *Logger) Warnf(format string, args ...interface{}) + func (l *Logger) Write(logLevel Level, args ...interface{}) + func (l *Logger) Writef(logLevel Level, format string, args ...interface{})