Class LogManager

java.lang.Object
com.log4rich.core.LogManager

public class LogManager extends Object
Factory and manager for Logger instances. Maintains a registry of loggers and provides thread-safe access.
  • Method Details

    • getLogger

      public static Logger getLogger(String name)
      Get a logger for the specified name.
      Parameters:
      name - The logger name
      Returns:
      Logger instance
    • getLogger

      public static Logger getLogger(Class<?> clazz)
      Get a logger for the specified class.
      Parameters:
      clazz - The class to get logger for
      Returns:
      Logger instance
    • getRootLogger

      public static Logger getRootLogger()
      Get the root logger.
      Returns:
      Root logger instance
    • exists

      public static boolean exists(String name)
      Check if a logger exists with the given name.
      Parameters:
      name - The logger name
      Returns:
      true if logger exists
    • getLoggerNames

      public static String[] getLoggerNames()
      Get all existing logger names.
      Returns:
      Array of logger names
    • shutdown

      public static void shutdown()
      Shutdown all loggers and their appenders.
    • reset

      public static void reset()
      Reset the logging system by removing all loggers.