package
1.4.2
Repository: https://github.com/named-data/ndnd.git
Documentation: pkg.go.dev

# Functions

Debug level message.
Debugf level formatted message.
Error level message.
Errorf level formatted message.
Fatal level message, followed by an exit.
Fatalf level formatted message, followed by an exit.
Info level message.
Infof level formatted message.
MustParseLevel parses level string or panics.
NewEntry returns a new entry for `log`.
NewText handler.
ParseLevel parses level string.
SetHandler sets the handler.
SetLevel sets the log level.
SetLevelFromString sets the log level from a string, panicing when invalid.
Trace returns a new entry with a Stop method to fire off a corresponding completion log, useful with defer.
Warn level message.
Warnf level formatted message.
WithDuration returns a new entry with the "duration" field set to the given duration in milliseconds.
WithError returns a new entry with the "error" set to `err`.
WithField returns a new entry with the `key` and `value` set.
WithFields returns a new entry with `fields` set.

# Constants

Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.

# Variables

Colors mapping.
Default handler outputting to stderr.
ErrInvalidLevel is returned if the severity level is invalid.
singletons ftw?.
Now returns the current time.
Strings mapping.

# Structs

Entry
Entry represents a single log entry.
Logger represents a logger with configurable Level and Handler.
Handler implementation.

# Interfaces

Fielder is an interface for providing fields to custom types.
Handler is used to handle log events, outputting them to stdio or sending them to remote services.
Interface represents the API of both Logger and Entry.

# Type aliases

Fields represents a map of entry level data used for structured logging.
The HandlerFunc type is an adapter to allow the use of ordinary functions as log handlers.
Level of severity.