Documentation
¶
Index ¶
- Constants
- type EventFn
- type Events
- type Level
- type Logger
- type Option
- func WithConsoleWriter(w io.Writer) Option
- func WithDebugEvent(fn EventFn) Option
- func WithErrorEvent(fn EventFn) Option
- func WithInfoEvent(fn EventFn) Option
- func WithLogLevel(lvl Level) Option
- func WithTraceIDFn(fn TraceIDFn) Option
- func WithWarnEvent(fn EventFn) Option
- func WithWriter(w io.Writer) Option
- type Record
- type TraceIDFn
Constants ¶
View Source
const ( LevelDebug = Level(slog.LevelDebug) LevelInfo = Level(slog.LevelInfo) LevelWarn = Level(slog.LevelWarn) LevelError = Level(slog.LevelError) )
A set of possible logging levels.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventFn ¶ added in v0.0.5
EventFn is a function to be executed when configured against a log level.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger represents a logger for logging information.
type Option ¶ added in v0.0.5
type Option func(o *options)
func WithConsoleWriter ¶ added in v0.0.5
func WithDebugEvent ¶ added in v0.0.5
func WithErrorEvent ¶ added in v0.0.5
func WithInfoEvent ¶ added in v0.0.5
func WithLogLevel ¶ added in v0.0.5
func WithTraceIDFn ¶ added in v0.0.5
func WithWarnEvent ¶ added in v0.0.5
func WithWriter ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.