Documentation ¶
Index ¶
- Constants
- func AddCallerSkip(n int) logsdk.Entry
- func Debug(ctx context.Context, args ...any)
- func Debugf(ctx context.Context, format string, args ...any)
- func Error(ctx context.Context, args ...any)
- func Errorf(ctx context.Context, format string, args ...any)
- func Exit(code int)
- func Fatal(ctx context.Context, args ...any)
- func Fatalf(ctx context.Context, format string, args ...any)
- func Field(key string, value any) logsdk.KV
- func Info(ctx context.Context, args ...any)
- func Infof(ctx context.Context, format string, args ...any)
- func Log(ctx context.Context, level Level, args ...any)
- func Logf(ctx context.Context, level Level, format string, args ...any)
- func Logger() *logsdk.Logger
- func Panic(ctx context.Context, args ...any)
- func Panicf(ctx context.Context, format string, args ...any)
- func Trace(ctx context.Context, args ...any)
- func Tracef(ctx context.Context, format string, args ...any)
- func Warn(ctx context.Context, args ...any)
- func Warnf(ctx context.Context, format string, args ...any)
- func WithField(key string, value any) logsdk.Entry
- func WithFields(fields ...logsdk.KV) logsdk.Entry
- func WithReportCaller(reportCaller bool) logsdk.Entry
- func WithReportStack(reportStack bool) logsdk.Entry
- func WithTime(t time.Time) logsdk.Entry
- type Level
Constants ¶
View Source
const ( LevelPanic = logsdk.LevelPanic LevelFatal = logsdk.LevelFatal LevelError = logsdk.LevelError LevelWarn = logsdk.LevelWarn LevelInfo = logsdk.LevelInfo LevelDebug = logsdk.LevelDebug LevelTrace = logsdk.LevelTrace )
Variables ¶
This section is empty.
Functions ¶
func AddCallerSkip ¶
AddCallerSkip 增加调用 runtime.Callers 时的 skip 参数, 当通过装饰器等方式封装 Entry 导致增加调用 Entry 方法的深度时使用 AddCallerSkip 调整 skip, 直接在需要日志的地方调用 Entry 的方法时不需要 AddCallerSkip.
func WithReportCaller ¶
WithReportCaller 设置 logsdk.Entry 是否收集调用记录
func WithReportStack ¶
WithReportStack 设置 logsdk.Entry 是否收集调用栈
Types ¶
Click to show internal directories.
Click to hide internal directories.