Documentation ¶
Index ¶
- func Error(format string, args ...interface{})
- func Errorc(ctx context.Context, format string, args ...interface{})
- func Errorv(ctx context.Context, args ...D)
- func Errorw(ctx context.Context, args ...interface{})
- func Info(format string, args ...interface{})
- func Infoc(ctx context.Context, format string, args ...interface{})
- func Infov(ctx context.Context, args ...D)
- func Infow(ctx context.Context, args ...interface{})
- func Warn(format string, args ...interface{})
- func Warnc(ctx context.Context, format string, args ...interface{})
- func Warnv(ctx context.Context, args ...D)
- func Warnw(ctx context.Context, args ...interface{})
- type D
- func KV(key string, value interface{}) D
- func KVDuration(key string, value time.Duration) D
- func KVFloat32(key string, value float32) D
- func KVFloat64(key string, value float64) D
- func KVInt(key string, value int) D
- func KVInt64(key string, value int64) D
- func KVString(key string, value string) D
- func KVUint(key string, value uint) D
- func KVUint64(key string, value uint64) D
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(format string, args ...interface{})
Error logs a message at the error log level.
func Errorc ¶
Errorc logs a message at the error log level.
func Errorv ¶
Errorv logs a message at the error log level.
func Errorw ¶
Errorw logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func Info ¶
func Info(format string, args ...interface{})
Info logs a message at the info log level.
func Infoc ¶
Infoc logs a message at the info log level.
func Infow ¶
Infow logs a message with some additional context. The variadic key-value pairs are treated as they are in With.
func Warn ¶
func Warn(format string, args ...interface{})
Warn logs a message at the warning log level.
func Warnc ¶
Warnc logs a message at the warning log level.
func Warnv ¶
Warnv logs a message at the warning log level.
Types ¶
type D ¶
D represents a map of entry level data used for structured logging. type D map[string]interface{}
func KV ¶
KV return a log kv for logging field. NOTE: use KV{type name} can avoid object alloc and get better performance. []~( ̄▽ ̄)~*干杯
func KVDuration ¶
KVDuration construct Field with Duration value.
func KVFloat32 ¶
KVFloat32 construct Field with float32 value.
func KVFloat64 ¶
KVFloat64 construct Field with float64 value.
func KVString ¶
KVString construct Field with string value.