Class LogUtil

java.lang.Object
com.dua3.utility.logging.LogUtil

public final class LogUtil extends Object
Utility class for logging operations.
  • Method Details

    • assureInitialized

      public static void assureInitialized()
      Checks if the globalDispatcher variable is null and initializes it by calling the init() method if necessary.
      Throws:
      ServiceConfigurationError - if no factories can create a LogEntryDispatcher
    • getGlobalDispatcher

      public static LogEntryDispatcher getGlobalDispatcher()
      Returns the global LogEntryDispatcher by using the available ILogEntryDispatcherFactory implementations loaded through ServiceLoader and connects all known loggers to it.
      Returns:
      The global LogEntryDispatcher instance.
      Throws:
      ServiceConfigurationError - if no factories can create a LogEntryDispatcher.