Documentation ¶
Index ¶
- type Fields
- type Level
- type Logger
- func (l *Logger) Debug(ctx context.Context, v ...any)
- func (l *Logger) Debugf(ctx context.Context, format string, v ...any)
- func (l *Logger) Error(ctx context.Context, v ...any)
- func (l *Logger) Errorf(ctx context.Context, format string, v ...any)
- func (l *Logger) Fatal(ctx context.Context, v ...any)
- func (l *Logger) Fatalf(ctx context.Context, format string, v ...any)
- func (l *Logger) Info(ctx context.Context, v ...any)
- func (l *Logger) Infof(ctx context.Context, format string, v ...any)
- func (l *Logger) JSONFormat(level Level, msg string) map[string]any
- func (l *Logger) Output(level Level, msg string)
- func (l *Logger) Panic(ctx context.Context, v ...any)
- func (l *Logger) Panicf(ctx context.Context, format string, v ...any)
- func (l *Logger) Trace(ctx context.Context, v ...any)
- func (l *Logger) Tracef(ctx context.Context, format string, v ...any)
- func (l *Logger) Warn(ctx context.Context, v ...any)
- func (l *Logger) Warnf(ctx context.Context, format string, v ...any)
- func (l *Logger) WithCaller(depth int) *Logger
- func (l *Logger) WithCallersFrames() *Logger
- func (l *Logger) WithContext(ctx context.Context) *Logger
- func (l *Logger) WithFields(f Fields) *Logger
- func (l *Logger) WithTrace() *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger defines a logger struct
func (*Logger) JSONFormat ¶
JSONFormat formats the given information into a log field
func (*Logger) WithCaller ¶
WithCaller returns a logger with caller, but caller message only for one line
func (*Logger) WithCallersFrames ¶
WithCallersFrames returns a logger with whole callstack message
func (*Logger) WithContext ¶
WithContext returns a logger with context
func (*Logger) WithFields ¶
WithFields returns a logger with fields
Click to show internal directories.
Click to hide internal directories.