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 as is.
- If an argument is a string and this is not the last argument,
the following argument is treated as the value and the two are combined
into an Attr.
- Otherwise, the argument is treated as a value with key "!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.)
If name is empty, WithGroup returns the receiver.
Generated using TypeDoc
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".