Class CommonLoggers

java.lang.Object
com.blamejared.crafttweaker.api.logging.CommonLoggers

public final class CommonLoggers extends Object
Provide a series of 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 Type
    Method
    Description
    static org.apache.logging.log4j.Logger
    api()
    Obtains the logger used by the CraftTweaker API.
    static org.apache.logging.log4j.Logger
    Obtains the logger for the command system.
    static org.apache.logging.log4j.Logger
    Obtains the logger used by the ZenCode system.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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_LOGGER over 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