Documentation
¶
Index ¶
- func ContextWithNewID(ctx context.Context) context.Context
- func ContextWithOverrideLevel(ctx context.Context, level Level) context.Context
- func Debug(args ...any)
- func DebugContext(ctx context.Context, args ...any)
- func Error(args ...any)
- func ErrorContext(ctx context.Context, args ...any)
- func Fatal(args ...any)
- func FatalContext(ctx context.Context, args ...any)
- func FormatLevel(level Level) string
- func IDFromContext(ctx context.Context) (uint32, bool)
- func Info(args ...any)
- func InfoContext(ctx context.Context, args ...any)
- func Panic(args ...any)
- func PanicContext(ctx context.Context, args ...any)
- func SetStdLogger(logger ContextLogger)
- func Trace(args ...any)
- func TraceContext(ctx context.Context, args ...any)
- func Warn(args ...any)
- func WarnContext(ctx context.Context, args ...any)
- type ContextLogger
- type Entry
- type Factory
- type Formatter
- type Level
- type Logger
- type ObservableFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶
func ErrorContext ¶
func FatalContext ¶
func FormatLevel ¶
func InfoContext ¶
func PanicContext ¶
func SetStdLogger ¶ added in v1.2.0
func SetStdLogger(logger ContextLogger)
func TraceContext ¶
func WarnContext ¶
Types ¶
type ContextLogger ¶
type ContextLogger logger.ContextLogger
func StdLogger ¶
func StdLogger() ContextLogger
type Factory ¶
type Factory interface {
Level() Level
SetLevel(level Level)
Logger() ContextLogger
NewLogger(tag string) ContextLogger
}
type Formatter ¶
type Formatter struct {
BaseTime time.Time
DisableColors bool
DisableTimestamp bool
FullTimestamp bool
TimestampFormat string
}
type ObservableFactory ¶
type ObservableFactory interface {
Factory
observable.Observable[Entry]
}
func NewNOPFactory ¶
func NewNOPFactory() ObservableFactory
func NewObservableFactory ¶
Click to show internal directories.
Click to hide internal directories.