Class TLcdLoggerFactory

java.lang.Object
com.luciad.util.logging.TLcdLoggerFactory

public class TLcdLoggerFactory extends Object
This class creates instances of the ILcdLogger interface. It is the main entry point of all logging in LuciadLightspeed.
By default logging delegates to the standard java.util.logging framework. To handle the log messages differently you can specify the class name of a concrete ILcdLoggerFactory implementation on the first non-empty, non-commented (using #) line of a configuration file called:
 META-INF/services/com.luciad.util.logging.ILcdLoggerFactory
 
For example, if the file contains the following:
 # This application suppresses all logging.
 com.luciad.util.logging.TLcdNullLoggerFactory
 
then the TLcdNullLoggerFactory class will be used for creating concrete ILcdLogger objects. In order for the configuration file to take effect, the top META-INF directory must be placed in a directory or jar file from the current class path.

Note that this class is not an ILcdLoggerFactory itself, it only delegates the creation to the class that was specified in the configuration file, or to the TLcdJULLoggerFactory if the file is not available.

Since:
9.0
  • Method Details

    • getLogger

      public static ILcdLogger getLogger(String aLoggerName)
      Returns the ILcdLogger having the given name.
      Parameters:
      aLoggerName - the logger name.
      Returns:
      the ILcdLogger.
    • getLogger

      public static ILcdLogger getLogger(Class aClass)
      Returns the ILcdLogger having the name of the given class.
      Parameters:
      aClass - the class for which to create the logger.
      Returns:
      the ILcdLogger