Class LoggerRegistry

java.lang.Object
com.blamejared.crafttweaker.impl.logging.LoggerRegistry
All Implemented Interfaces:
ILoggerRegistry

public final class LoggerRegistry extends Object implements ILoggerRegistry
  • Method Details

    • get

      public static LoggerRegistry get()
    • getLoggerFor

      public org.apache.logging.log4j.Logger getLoggerFor(String system)
      Description copied from interface: ILoggerRegistry
      Obtains a Logger for logging messages related to the specified system.

      The given logger is automatically configured to output messages to crafttweaker.log with the correct format. It can be therefore used directly.

      The system name can be any string, but it usually suggested to use the mod name (e.g. "CraftTweaker" or "Mekanism"). In case the mod name is not specific enough, because there are multiple integrations or the developer wants to be more specific, an additional specifier can be appended to the mod name with a dash (e.g. "CraftTweaker-ZenCode" or "Mekanism-Content"). Other formats are allowed, but discouraged as a matter of conventions.

      Specified by:
      getLoggerFor in interface ILoggerRegistry
      Parameters:
      system - The name of the system.
      Returns:
      A Logger instance tailored to the given system.