Class LogConfig

java.lang.Object
com.petarmc.lib.log.LogConfig

public class LogConfig extends Object
Configuration settings for the logging system. Allows controlling log levels, output format, and file logging options.
  • Field Details

    • globalLevel

      public static LogLevel globalLevel
      The global log level. Messages below this level will be ignored if enforceLevel is true. Default is LogLevel.INFO.
    • logToFile

      public static boolean logToFile
      If true, log messages will also be written to a file. Default is false.
    • logFilePath

      public static String logFilePath
      The path of the log file when logToFile is true. Default is "petarlib.log".
    • globalPrefix

      public static String globalPrefix
      A prefix to add to every log message, e.g., "[MyMod]". Default is an empty string.
    • includeTimestamp

      public static boolean includeTimestamp
      If true, timestamps will be included in log messages. Default is true.
    • includeThread

      public static boolean includeThread
      If true, the current thread name will be included in log messages. Default is false.
    • enforceLevel

      public static boolean enforceLevel
      If true, log messages will be filtered based on the global log level. If false, all messages will be logged regardless of level. Default is true.
  • Constructor Details

    • LogConfig

      public LogConfig()