Returns the current custom log callback, undefined
by default. See
setCustomLogCallback() for a detailed
description.
Registers a file path where logs will be written to, whenever Ditto wants to issue a log (on top of emitting the log to the console).
Represents whether or not emojis should be used as the log level indicator in the logs.
Represents whether or not emojis should be used as the log level indicator in the logs.
Whether the logger is currently enabled.
Enables or disables logging.
The minimum log level at which logs will be logged.
For example if this is set to Warning
, then only logs that are logged
with the Warning
or Error
log levels will be shown.
The minimum log level at which logs will be logged.
For example if this is set to Warning
, then only logs that are logged
with the Warning
or Error
log levels will be shown.
Logs the message for the given level
.
Registers a custom callback that will be called to report each log entry.
function called for each log entry. undefined
will
unregister any previous callback and stop reporting log entries through
callbacks.
On Node, registers a file path where logs will be written to, whenever Ditto wants to issue a log (on top of emitting the log to the console). In the browser, this method has no effect.
can be null
, in which case the current logging file, if any,
is unregistered, otherwise, the file path must be within an already
existing directory.
Convenience method, takes the path part of the URL and calls setLogFile() with it.
Returns the shared Logger instance.
Class with static methods to customize the logging behavior from Ditto and log messages with the Ditto logging infrastructure.