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 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 TraceContext ¶
func WarnContext ¶
Types ¶
type ContextLogger ¶
type ContextLogger interface {
Logger
TraceContext(ctx context.Context, args ...any)
DebugContext(ctx context.Context, args ...any)
InfoContext(ctx context.Context, args ...any)
WarnContext(ctx context.Context, args ...any)
ErrorContext(ctx context.Context, args ...any)
FatalContext(ctx context.Context, args ...any)
PanicContext(ctx context.Context, args ...any)
}
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 ¶
func NewObservableFactory(formatter Formatter, writer io.Writer) ObservableFactory
Click to show internal directories.
Click to hide internal directories.