A Logger records structured information about each call to its
Log, Debug, Info, Warn, and Error methods.
For each call, it creates a [Record] and passes it to a [Handler].
To create a new Logger, call [New] or a Logger method
that begins "With".
Log emits a log record with the current time and the given level and message.
The Record's Attrs consist of the Logger's attributes followed by
the Attrs specified by args.
The attribute arguments are processed as follows:
- If an argument is an Attr, it is used asis. - If an argument is a string and this is not the last argument, the following argument is treated asthevalueandthetwoarecombined into an Attr. - Otherwise, the argument is treated asavaluewithkey"!BADKEY".
WithGroup returns a Logger that starts a group, if name is non-empty.
The keys of all attributes added to the Logger will be qualified by the given
name. (How that qualification happens depends on the [Handler.WithGroup]
method of the Logger's Handler.)
A Logger records structured information about each call to its Log, Debug, Info, Warn, and Error methods. For each call, it creates a [Record] and passes it to a [Handler].
To create a new Logger, call [New] or a Logger method that begins "With".