Documentation ¶
Index ¶
- func AddGlobalFields(fields ...LogField)
- func Alert(_ context.Context, v string)
- func Close() error
- func Debug(ctx context.Context, v ...interface{})
- func Debugf(ctx context.Context, format string, v ...interface{})
- func Debugv(ctx context.Context, v interface{})
- func Debugw(ctx context.Context, msg string, fields ...LogField)
- func Error(ctx context.Context, v ...any)
- func Errorf(ctx context.Context, format string, v ...any)
- func Errorv(ctx context.Context, v any)
- func Errorw(ctx context.Context, msg string, fields ...LogField)
- func Info(ctx context.Context, v ...any)
- func Infof(ctx context.Context, format string, v ...any)
- func Infov(ctx context.Context, v any)
- 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 ...any)
- func Slowf(ctx context.Context, format string, v ...any)
- func Slowv(ctx context.Context, v any)
- 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.