Documentation ¶
Index ¶
- Variables
- func AddWriter(writer io.Writer)
- func Debug(args ...any)
- func Debugf(format string, args ...interface{})
- func DeleteWriter(writer io.Writer)
- func Error(args ...any)
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...any)
- func Infof(format string, args ...interface{})
- func NameEncoder(loggerName string, enc zapcore.PrimitiveArrayEncoder)
- func Panicf(format string, args ...interface{})
- func Warn(args ...any)
- func Warnf(format string, args ...interface{})
- type Logger
- func (l *Logger) Debug(msg string, fields ...zap.Field)
- func (l *Logger) Error(msg string, fields ...zap.Field)
- func (l *Logger) Fatal(msg string, fields ...zap.Field)
- func (l *Logger) Info(msg string, fields ...zap.Field)
- func (l Logger) Lang(lang map[string]string) *Logger
- func (l Logger) Named(name string) *Logger
- func (l *Logger) Panic(msg string, fields ...zap.Field)
- func (l *Logger) Trace(msg string, fields ...zap.Field)
- func (l *Logger) Warn(msg string, fields ...zap.Field)
- func (l Logger) With(fields ...zap.Field) *Logger
- type MultipleWriter
- type Zap
Constants ¶
This section is empty.
Variables ¶
View Source
var LogLevel = zap.NewAtomicLevelAt(zap.DebugLevel)
View Source
var Trace bool
Functions ¶
func DeleteWriter ¶
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger.
func NameEncoder ¶
func NameEncoder(loggerName string, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type MultipleWriter ¶
func (*MultipleWriter) Add ¶
func (m *MultipleWriter) Add(writer io.Writer)
type Zap ¶
type Zap interface { Lang(lang map[string]string) *Logger Named(name string) *Logger With(fields ...zap.Field) *Logger Trace(msg string, fields ...zap.Field) Debug(msg string, fields ...zap.Field) Info(msg string, fields ...zap.Field) Warn(msg string, fields ...zap.Field) Error(msg string, fields ...zap.Field) }
Click to show internal directories.
Click to hide internal directories.