Documentation ¶
Index ¶
- Variables
- func Debug(args ...interface{})
- func DebugContextf(ctx context.Context, format string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func ErrorContextf(ctx context.Context, format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func FatalContextf(ctx context.Context, format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func InfoContextf(ctx context.Context, format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func NewZapLogger(file string, level string) *zaplogger
- func Register(name string, logger Logger)
- func SetDefaultLogger(logger Logger)
- func SetLevel(name string, level Level)
- func Sync()
- func Trace(args ...interface{})
- func TraceContextf(ctx context.Context, format string, args ...interface{})
- func Tracef(format string, args ...interface{})
- func Warn(args ...interface{})
- func WarnContextf(ctx context.Context, format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- func WithContextFields(ctx context.Context, fields ...Field) context.Context
- func WithContextPairs(ctx context.Context, kvs ...string) context.Context
- type Field
- type Level
- type Logger
- type Msg
Constants ¶
This section is empty.
Variables ¶
View Source
var LevelToString = map[Level]string{ LevelTrace: "trace", LevelDebug: "debug", LevelInfo: "info", LevelWarn: "warn", LevelError: "error", LevelFatal: "fatal", }
Functions ¶
func DebugContextf ¶
func ErrorContextf ¶
func FatalContextf ¶
func InfoContextf ¶
func NewZapLogger ¶
func SetDefaultLogger ¶
func SetDefaultLogger(logger Logger)
func TraceContextf ¶
func WarnContextf ¶
func WithContextFields ¶
Types ¶
type Logger ¶
type Logger interface { Sync() error SetLevel(name string, level Level) GetLevel(name string) Level With(fields ...Field) Logger Trace(args ...interface{}) Tracef(format string, args ...interface{}) Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) }
func DefaultLogger ¶
func DefaultLogger() Logger
Click to show internal directories.
Click to hide internal directories.