Class Log4jToJUL

java.lang.Object
me.hsgamer.hscore.logging.log4j.Log4jToJUL

public final class Log4jToJUL extends Object
A simple utility to merge / create a Logger from a Logger
  • Method Details

    • publishLogRecord

      public static void publishLogRecord(LogRecord logRecord, Function<LogRecord,String> formatFunction, org.apache.logging.log4j.Logger log4jLogger)
      Publish the LogRecord to Logger
      Parameters:
      logRecord - the LogRecord
      formatFunction - the function to format the LogRecord
      log4jLogger - the Logger
    • publishLogRecord

      public static void publishLogRecord(LogRecord logRecord, Formatter formatter, org.apache.logging.log4j.Logger log4jLogger)
      Publish the LogRecord to Logger
      Parameters:
      logRecord - the LogRecord
      formatter - the Formatter to format the LogRecord
      log4jLogger - the Logger
    • merge

      public static void merge(Logger julLogger, org.apache.logging.log4j.Logger log4jLogger)
      Merge the Logger to Logger
      Parameters:
      julLogger - the Logger
      log4jLogger - the Logger
    • createLogger

      public static Logger createLogger(String name, org.apache.logging.log4j.Logger log4jLogger)
      Create a Logger from a Logger
      Parameters:
      log4jLogger - the Logger
      name - the name of the Logger
      Returns:
      the Logger
    • createLogger

      public static Logger createLogger(org.apache.logging.log4j.Logger log4jLogger)
      Create a Logger from a Logger
      Parameters:
      log4jLogger - the Logger
      Returns:
      the Logger