The log level to use for this logger, defaults to 'error'
.
The tag to use for this logger, defaults to this libraries (short) user agent.
Protected
logThe log level to use for this logger.
off
- Do not log any messages.fatal
- Only log fatal (error) messages.error
- Log all (error) messages (excludes warn
, info
, debug
, and trace
).warn
- Log all messages except info
, debug
, and trace
.info
- Log all messages except debug
and trace
.debug
- Log all messages except trace
.trace
- Log all messages.Protected
logThe tag to use for this logger.
Extends the current logger with a new log tag.
The new log tag to use
A new logger instance with the new log tag
Protected
formatFormats a message for logging, including the log level and log tag.
The log level to use
Rest
...args: unknown[]The arguments to log
The formatted message
Protected
shouldChecks whether a log level should be logged based on the current log level.
The log level to check
Whether the log level should be logged
Creates a new console logger instance, which (as you might expect) logs messages to the console.