Documentation ¶
Index ¶
- Variables
- func BuildLogger(ctx context.Context) context.Context
- func ContextWithLogger(ctx context.Context, logg Logger) context.Context
- func DPanic(ctx context.Context, args ...interface{})
- func DPanicf(ctx context.Context, template string, args ...interface{})
- func DPanicw(ctx context.Context, msg string, keysAndValues ...interface{})
- func Debug(ctx context.Context, args ...interface{})
- func Debugf(ctx context.Context, template string, args ...interface{})
- func Debugw(ctx context.Context, msg string, keysAndValues ...interface{})
- func Error(ctx context.Context, args ...interface{})
- func Errorf(ctx context.Context, template string, args ...interface{})
- func Errorw(ctx context.Context, msg string, keysAndValues ...interface{})
- func Fatal(ctx context.Context, args ...interface{})
- func Fatalf(ctx context.Context, template string, args ...interface{})
- func Fatalw(ctx context.Context, msg string, keysAndValues ...interface{})
- func GetTraceID(ctx context.Context) string
- func Info(ctx context.Context, args ...interface{})
- func Infof(ctx context.Context, template string, args ...interface{})
- func Infow(ctx context.Context, msg string, keysAndValues ...interface{})
- func Log(ctx context.Context, keyvals ...interface{})
- func NewZapEncoderConfig() zapcore.EncoderConfig
- func Panic(ctx context.Context, args ...interface{})
- func Panicf(ctx context.Context, template string, args ...interface{})
- func Panicw(ctx context.Context, msg string, keysAndValues ...interface{})
- func SetDefaultLogger(logg Logger)
- func Sync(ctx context.Context)
- func Warn(ctx context.Context, args ...interface{})
- func Warnf(ctx context.Context, template string, args ...interface{})
- func Warnw(ctx context.Context, msg string, keysAndValues ...interface{})
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TypeKey ... TypeKey = "file" // TypeValAccess ... TypeValAccess = "access.log" // TypeValRPC ... TypeValRPC = "rpc.log" // TypeValRedis ... TypeValRedis = "redis.log" )
Functions ¶
func ContextWithLogger ¶
ContextWithLogger function
func GetTraceID ¶
GetTraceID Get trace id from the context.
Types ¶
type Logger ¶
type Logger interface { DPanic(args ...interface{}) DPanicf(template string, args ...interface{}) DPanicw(msg string, keysAndValues ...interface{}) Debug(args ...interface{}) Debugf(template string, args ...interface{}) Debugw(msg string, keysAndValues ...interface{}) Error(args ...interface{}) Errorf(template string, args ...interface{}) Errorw(msg string, keysAndValues ...interface{}) Fatal(args ...interface{}) Fatalf(template string, args ...interface{}) Fatalw(msg string, keysAndValues ...interface{}) Info(args ...interface{}) Infof(template string, args ...interface{}) Infow(msg string, keysAndValues ...interface{}) Panic(args ...interface{}) Panicf(template string, args ...interface{}) Panicw(msg string, keysAndValues ...interface{}) Sync() error Warn(args ...interface{}) Warnf(template string, args ...interface{}) Warnw(msg string, keysAndValues ...interface{}) With(args ...interface{}) Logger Log(keyvals ...interface{}) error }
Logger interface
func LoggerFromContext ¶
LoggerFromContext function
Click to show internal directories.
Click to hide internal directories.