public class TLcdLoggerFactory extends Object
ILcdLogger
interface. It is the main entry point of all logging
in LuciadLightspeed.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.TLcdNullLoggerFactorythen 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.
Modifier and Type | Method and Description |
---|---|
static ILcdLogger |
getLogger(Class aClass)
Returns the
ILcdLogger having the name of the given class. |
static ILcdLogger |
getLogger(String aLoggerName)
Returns the
ILcdLogger having the given name. |
public static ILcdLogger getLogger(String aLoggerName)
ILcdLogger
having the given name.aLoggerName
- the logger name.ILcdLogger
.public static ILcdLogger getLogger(Class aClass)
ILcdLogger
having the name of the given class.aClass
- the class for which to create the logger.ILcdLogger