Interface ILoggerRegistry

All Known Implementing Classes:
LoggerRegistry

public interface ILoggerRegistry
Manages the Logger instances for the various systems.

An instance of this class can be obtained through CraftTweakerAPI.

Since:
11.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.logging.log4j.Logger
    Obtains a Logger for logging messages related to the specified system.
  • Method Details

    • getLoggerFor

      org.apache.logging.log4j.Logger getLoggerFor(String system)
      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.

      Parameters:
      system - The name of the system.
      Returns:
      A Logger instance tailored to the given system.
      Since:
      11.0.0