The context type of this logger, e.g. "Plugin" or "Coremod".
The context name of this logger, e.g. the name of the plugin or coremod.
The color of the prefix. This should be a valid CSS color string. If not specified, it defaults to a blurple color.
Logs a message at the "error" level, which is visually distinct from regular logs and warnings. This is useful for logging error messages that indicate a failure or problem that needs attention.
The item(s) to log.
Logs a message at the "info" level, which is visually distinct from regular logs. This is useful for logging informational messages that are more important than regular logs, but not as severe as warnings or errors.
The item(s) to log.
Logs a message at the "log" level, which is the default logging level. This is useful for logging general messages that are not warnings or errors.
The item(s) to log.
Logs a message at the "verbose" level, which is only visible when verbose logging is enabled in the console. This is useful for logging detailed information that may be too noisy for regular logging, but can be helpful for debugging.
The item(s) to log.
Logs a message at the "warn" level, which is visually distinct from regular logs. This is useful for logging warning messages that indicate a potential issue or something that should be noted, but may not necessarily be a problem.
The item(s) to log.
StaticapiInternalConvenience method to create a new Logger for an API.
The name of the API.
Optionalcolor: stringThe color of the prefix. This should be a valid CSS color string. If not specified, it defaults to a blurple color.
A Logger instance with the type set to "API".
StaticcoremodInternalConvenience method to create a new Logger for a coremod.
The name of the coremod.
Optionalcolor: stringThe color of the prefix. This should be a valid CSS color string. If not specified, it defaults to a blurple color.
A Logger instance with the type set to "Coremod".
StaticmanagerInternalConvenience method to create a new Logger for a manager.
The name of the manager.
Optionalcolor: stringThe color of the prefix. This should be a valid CSS color string. If not specified, it defaults to a blurple color.
A Logger instance with the type set to "Manager".
StaticpluginConvenience method to create a new Logger for a plugin.
The name of the plugin.
Optionalcolor: stringThe color of the prefix. This should be a valid CSS color string. If not specified, it defaults to a blurple color.
A Logger instance with the type set to "Plugin".
A convenient way to manage logging things to the console with colorful prefixes indicating their context. Each
Loggerinstance stores its context type, context name, and prefix color, so you can use its log, warn, and error methods in the same manner that you would use theconsolemethods with the same names. The prefix will be generated and prepended to the appropriate console message automatically.If you are only logging a single message with a prefix in your plugin, you may use log, warn, or error instead of creating a
Logger. Otherwise, using this class is much more convenient than specifying the type, name, and color for every message.Example