Skip to content

Logger

Every plugin has a logger that prints to the game console, tagged with the plugin name and colored by level.

Functions

Logging

Balltze.logger.debug(format, ...)
Balltze.logger.info(format, ...)
Balltze.logger.warning(format, ...)
Balltze.logger.error(format, ...)
Balltze.logger.fatal(format, ...)

Prints a message at the given level. With more than one argument, the message is formatted with {} placeholders (see Formatting).

Balltze.logger.info("Loaded {} spawn points", #spawns)

Balltze.logger.muteConsole

Balltze.logger.muteConsole(setting)

Stops printing the plugin's messages in the game console when setting is true. Without an argument, returns the current setting.

Balltze.logger.muteDebug

Balltze.logger.muteDebug(setting)

Hides the plugin's debug messages when setting is true. Debug messages are shown by default. Without an argument, returns the current setting.