Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func SetLevel(level Level)
- func SetLogger(l *zap.SugaredLogger)
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(args ...interface{})
Debug logs a debug-level message with optional key/value pairs.
func Debugf ¶
func Debugf(template string, args ...interface{})
Debugf logs a debug-level message with formatting.
func Debugw ¶
func Debugw(msg string, keysAndValues ...interface{})
Debugw logs a debug-level message with optional structured context.
func Error ¶
func Error(args ...interface{})
Error logs an error-level message with optional key/value pairs.
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf logs an error-level message with formatting.
func Errorw ¶
func Errorw(msg string, keysAndValues ...interface{})
Errorw logs an error-level message with optional structured context.
func Fatal ¶
func Fatal(args ...interface{})
Fatal logs a fatal-level message, then calls os.Exit(1).
func Fatalf ¶
func Fatalf(template string, args ...interface{})
Fatalf logs a fatal-level message with formatting, then calls os.Exit(1).
func Fatalw ¶
func Fatalw(msg string, keysAndValues ...interface{})
Fatalw logs a fatal-level message with optional structured context, then calls os.Exit(1).
func Info ¶
func Info(args ...interface{})
Info logs an info-level message with optional key/value pairs.
func Infof ¶
func Infof(template string, args ...interface{})
Infof logs an info-level message with formatting.
func Infow ¶
func Infow(msg string, keysAndValues ...interface{})
Infow logs an info-level message with optional structured context.
func Panicf ¶
func Panicf(template string, args ...interface{})
Panicf logs a panic-level message with formatting, then calls panic.
func Panicw ¶
func Panicw(msg string, keysAndValues ...interface{})
Panicw logs a panic-level message with optional structured context, then calls panic.
func SetLogger ¶
func SetLogger(l *zap.SugaredLogger)
SetLogger allows replacing the default logger with a custom one.
func Warn ¶
func Warn(args ...interface{})
Warn logs a warn-level message with optional key/value pairs.
Types ¶
type Level ¶
const ( DebugLevel Level = Level(zapcore.DebugLevel) InfoLevel Level = Level(zapcore.InfoLevel) WarnLevel Level = Level(zapcore.WarnLevel) ErrorLevel Level = Level(zapcore.ErrorLevel) DPanicLevel Level = Level(zapcore.DPanicLevel) PanicLevel Level = Level(zapcore.PanicLevel) FatalLevel Level = Level(zapcore.FatalLevel) )