Creates a new instance of the Logger class.
The configuration options for the logger.
ReadonlystylesThe color styles to use for formatting log messages.
Returns the current logger configuration.
StaticgetReturns the singleton instance of the Logger class. If no instance has been created yet, it will create a new one with the given configuration. If an instance already exists, it will return the existing instance and set the given configuration.
The configuration options for the logger.
Registers one or multiple plugins with the logger. Plugins can be added after the logger is instantiated. If a plugin has an initialize method, it will be executed immediately after registration.
A single plugin or an array of plugins to register with the logger.
Sets the configuration options for the logger.
Throws an error with the specified message and error name.
If errName is not provided, the default error name is used.
If message is a string, a new error is created with the given message.
If message is an error, the error is cloned and the error name is set.
If message is any other type, the error message is set to the stringified value of message.
the error message or error object to throw
OptionalerrName: stringthe name of the error, defaults to DEFAULT_ERROR_NAME
Unregisters a plugin from the logger by its name. If the plugin has a destroy method, it will be called before the plugin is removed.
The name of the plugin to unregister. Can be a string or an array of strings.
The Logger class provides a way to log messages with different levels of severity. It also allows for customization of the logging behavior through plugins.