Class CommonLoggers
Logger instances for the most common systems.
Usage of these loggers is encouraged whenever possible to ensure consistency in the logging. Refer to the documentation of the various methods for additional details relating to the specific system.
- Since:
- 11.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.logging.log4j.Loggerapi()Obtains the logger used by the CraftTweaker API.static org.apache.logging.log4j.Loggercommands()Obtains the logger for the command system.static org.apache.logging.log4j.LoggerzenCode()Obtains the logger used by the ZenCode system.
-
Method Details
-
api
public static org.apache.logging.log4j.Logger api()Obtains the logger used by the CraftTweaker API.Integration writers should NEVER need usage of this logger: it is merely provided as a way for the CraftTweaker API to log messages safely. Integration writers should instead prefer their own logger, for ease of system tracking.
- Returns:
- The logger specifically used by the CraftTweaker API.
- Since:
- 11.0.0
-
commands
public static org.apache.logging.log4j.Logger commands()Obtains the logger for the command system.Usage of this logger is suggested for actions concerning user commands that are executed through one of the subcommands of
/ct. Example of such actions include confirmation of actions, responses, and dumps of various objects.Commands should prefer referencing
CommandUtilities.COMMAND_LOGGERover using this method directly for more API compatibility.- Returns:
- The logger for the command system.
- Since:
- 11.0.0
-
zenCode
public static org.apache.logging.log4j.Logger zenCode()Obtains the logger used by the ZenCode system.Usages of this logger is suggested for actions related to script execution and discovery, along with warning and error messages emitted by bracket validators and bracket resolvers.
- Returns:
- The logger for the ZenCode system.
- Since:
- 11.0.0
-