Documentation
¶
Index ¶
- Constants
- func Debug(message string)
- func DebugC(component string, message string)
- func DebugCF(component string, message string, fields map[string]any)
- func DebugF(message string, fields map[string]any)
- func Debugf(message string, ss ...any)
- func DisableFileLogging()
- func EnableFileLogging(filePath string) error
- func Error(message string)
- func ErrorC(component string, message string)
- func ErrorCF(component string, message string, fields map[string]any)
- func ErrorF(message string, fields map[string]any)
- func Errorf(message string, ss ...any)
- func Fatal(message string)
- func FatalC(component string, message string)
- func FatalCF(component string, message string, fields map[string]any)
- func FatalF(message string, fields map[string]any)
- func Fatalf(message string, ss ...any)
- func Info(message string)
- func InfoC(component string, message string)
- func InfoCF(component string, message string, fields map[string]any)
- func InfoF(message string, fields map[string]any)
- func Infof(message string, ss ...any)
- func SetLevel(level LogLevel)
- func Warn(message string)
- func WarnC(component string, message string)
- func WarnCF(component string, message string, fields map[string]any)
- func WarnF(message string, fields map[string]any)
- type LogLevel
- type Logger
- func (b *Logger) Debug(v ...any)
- func (b *Logger) Debugf(format string, v ...any)
- func (b *Logger) Error(v ...any)
- func (b *Logger) Errorf(format string, v ...any)
- func (b *Logger) Fatalf(format string, v ...any)
- func (b *Logger) Info(v ...any)
- func (b *Logger) Infof(format string, v ...any)
- func (b *Logger) Log(msgL, caller int, format string, a ...any)
- func (b *Logger) Sync() error
- func (b *Logger) Warn(v ...any)
- func (b *Logger) Warnf(format string, v ...any)
- func (b *Logger) Warningf(format string, v ...any)
- func (b *Logger) WithLevels(levels map[int]LogLevel) *Logger
Constants ¶
View Source
const ( DEBUG = zerolog.DebugLevel INFO = zerolog.InfoLevel WARN = zerolog.WarnLevel ERROR = zerolog.ErrorLevel FATAL = zerolog.FatalLevel )
Variables ¶
This section is empty.
Functions ¶
func DisableFileLogging ¶
func DisableFileLogging()
func EnableFileLogging ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements common Logger interface
func NewLogger ¶ added in v0.2.3
NewLogger creates a new logger instance with optional component name
func (*Logger) Log ¶ added in v0.2.3
Log logs a message at a given level with caller information the func name must be this because 3rd party loggers expect this msgL: message level (DEBUG, INFO, WARN, ERROR, FATAL) caller: unused parameter reserved for compatibility format: format string a: format arguments
Click to show internal directories.
Click to hide internal directories.