Package wt.log4j

Class LogManager

java.lang.Object
wt.log4j.LogManager

public class LogManager extends Object
The anchor point for the logging system. The most common usage of this class is to obtain a named Logger. The method getLogger() is provided as the most convenient way to obtain a named Logger based on the calling class name.

Supported API: true
Extendable: false
  • Method Details

    • getLogger

      public static Logger getLogger(Class<?> clazz)
      Returns a Logger using the fully qualified name of the Class as the logger name.

      Supported API: true
      Extendable: false
      Parameters:
      clazz - The Class whose name should be used as the Logger name. If null it will default to the calling class.
      Returns:
      The Logger.
      Throws:
      UnsupportedOperationException - if the clazz is null and the calling class cannot be determined.
    • getLogger

      public static Logger getLogger(String name)
      Returns a Logger with the specified name.

      Supported API: true
      Extendable: false
      Parameters:
      name - The logger name. If null the name of the calling class will be used.
      Returns:
      The Logger.
      Throws:
      UnsupportedOperationException - if the name is null and the calling class cannot be determined.
    • getLogger

      public static Logger getLogger()
      Returns a Logger with the name of the calling class.

      Supported API: true
      Extendable: false
      Returns:
      The Logger for the calling class.
      Throws:
      UnsupportedOperationException - if the calling class cannot be determined.