Documentation ¶
Index ¶
- Constants
- func Context(ctx context.Context, l Logger) context.Context
- func Debug(m ...any)
- func Debugf(format string, m ...any)
- func Error(m ...any)
- func Errorf(format string, m ...any)
- func Fatal(m ...any)
- func Fatalf(format string, m ...any)
- func Info(m ...any)
- func Infof(format string, m ...any)
- func Panic(m ...any)
- func Panicf(format string, m ...any)
- func Printf(format string, m ...any)
- func Use(l Logger)
- func Warn(m ...any)
- func Warnf(format string, m ...any)
- type Flusher
- type Level
- type Logger
- type SimpleLoggerOption
Constants ¶
View Source
const (
ContextKeyLogger contextKey = "github.com/go-haru/log.Logger"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(v ...any) Debugf(format string, v ...any) Info(v ...any) Infof(format string, v ...any) Warn(v ...any) Warnf(format string, v ...any) Error(v ...any) Errorf(format string, v ...any) Fatal(v ...any) Fatalf(format string, v ...any) Panic(v ...any) Panicf(format string, v ...any) Print(v ...any) Printf(format string, v ...any) With(v ...field.Field) Logger WithName(name string) Logger WithLevel(level Level) Logger AddDepth(depth int) Logger Flusher Standard() *log.Logger }
type SimpleLoggerOption ¶
type SimpleLoggerOption func(*simpleLogger)
func SimpleAddDepth ¶
func SimpleAddDepth(depth int) SimpleLoggerOption
func SimpleWithData ¶
func SimpleWithData(fields ...field.Field) SimpleLoggerOption
func SimpleWithDepth ¶
func SimpleWithDepth(depth int) SimpleLoggerOption
func SimpleWithLevel ¶
func SimpleWithLevel(level Level) SimpleLoggerOption
func SimpleWithName ¶
func SimpleWithName(name string) SimpleLoggerOption
Click to show internal directories.
Click to hide internal directories.