Logger
Logger is comet's shared logging utility. You can use it from your own systems and configure it with Comet.configureLogger().
Log Levels
SYSTEMprints comet's internal debug messages.VERBOSEprints verbose messages and everything above it.WARNINGprints warnings, errors, and fatals.ERRORprints errors and fatals.FATALprints only fatal errors.SILENTdisables all logger output.
Methods
Logger.verbose(...args)prints with aVRBprefix.Logger.warn(...args)prints with aWARNprefix.Logger.error(...args)throws with anERRprefix.Logger.fatal(...args)throws with aFATALprefix.
Logger.system(...args) also exists, but it is intended for comet's internal debug output.
Notes
- Without
Comet.configureLogger(), the logger starts atLogLevel.WARNING. showLeveland plugin-name prefixing are controlled throughComet.configureLogger().Logger.error()andLogger.fatal()do not just print; they raise errors.
Usage
ts
import { Logger, OnInit, System } from "@rbxts/comet";
@System()
export class MySystem implements OnInit {
public onInit() {
Logger.warn("Widget state is out of date");
}
}