Class LogFactory

java.lang.Object
org.apache.juli.logging.LogFactory

public class LogFactory extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Log
    getLog(Class<?> clazz)
    Convenience method to return a named logger, without the application having to care about factories.
    static Log
    getLog(String name)
    Convenience method to return a named logger, without the application having to care about factories.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogFactory

      public LogFactory()
  • Method Details

    • getLog

      public static Log getLog(Class<?> clazz) throws LogConfigurationException
      Convenience method to return a named logger, without the application having to care about factories.
      Parameters:
      clazz - Class from which a log name will be derived
      Returns:
      The log
      Throws:
      LogConfigurationException - if a suitable Log instance cannot be returned
    • getLog

      public static Log getLog(String name) throws LogConfigurationException
      Convenience method to return a named logger, without the application having to care about factories.
      Parameters:
      name - Logical name of the Log instance to be returned (the meaning of this name is only known to the underlying logging implementation that is being wrapped)
      Returns:
      The log
      Throws:
      LogConfigurationException - if a suitable Log instance cannot be returned