Documentation ¶
Index ¶
- func AddGlobalFields(fields ...LogField)
- func Alert(_ context.Context, v string)
- func Close() error
- func Error(ctx context.Context, v ...interface{})
- func Errorf(ctx context.Context, format string, v ...interface{})
- func Errorv(ctx context.Context, v interface{})
- func Errorw(ctx context.Context, msg string, fields ...LogField)
- func Info(ctx context.Context, v ...interface{})
- func Infof(ctx context.Context, format string, v ...interface{})
- func Infov(ctx context.Context, v interface{})
- func Infow(ctx context.Context, msg string, fields ...LogField)
- func Must(err error)
- func MustSetup(c logx.LogConf)
- func SetLevel(level uint32)
- func SetUp(c LogConf) error
- func Slow(ctx context.Context, v ...interface{})
- func Slowf(ctx context.Context, format string, v ...interface{})
- func Slowv(ctx context.Context, v interface{})
- func Sloww(ctx context.Context, msg string, fields ...LogField)
- type LogConf
- type LogField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorv ¶
Errorv writes v into error log with json content. No call stack attached, because not elegant to pack the messages.
func SetLevel ¶
func SetLevel(level uint32)
SetLevel sets the logging level. It can be used to suppress some logs.
func SetUp ¶
SetUp sets up the logx. If already set up, just return nil. we allow SetUp to be called multiple times, because for example we need to allow different service frameworks to initialize logx respectively. the same logic for SetUp
Types ¶
Click to show internal directories.
Click to hide internal directories.