Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleHandler ¶
type ConsoleHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(out io.Writer, opts *HandlerOptions) *ConsoleHandler
type HandlerOptions ¶
type HandlerOptions struct {
// AddSource causes the handler to compute the source code position
// of the log statement and add a SourceKey attribute to the output.
AddSource bool
// Level reports the minimum record level that will be logged.
// The handler discards records with lower levels.
// If Level is nil, the handler assumes LevelInfo.
// The handler calls Level.Level for each record processed;
// to adjust the minimum level dynamically, use a LevelVar.
Level slog.Leveler
}
HandlerOptions are options for a ConsoleHandler. A zero HandlerOptions consists entirely of default values.
Click to show internal directories.
Click to hide internal directories.

