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 TypeMethodDescriptionorg.apache.logging.log4j.LoggergetLoggerFor(String system) Obtains aLoggerfor logging messages related to the specified system.
-
Method Details
-
getLoggerFor
Obtains aLoggerfor logging messages related to the specified system.The given logger is automatically configured to output messages to
crafttweaker.logwith 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
Loggerinstance tailored to the given system. - Since:
- 11.0.0
-