Use the Logger.properties file to set logger
attributes for specific loggers. The properties file is loaded the first
time that the Logger.getLogger(logger_name) method is called
within an application.
Important: The name of the Logger.properties file
is case sensitive. Use a capital "L" in the file name.
When an application
calls the Logger.getLogger method for the first time, all the available logger
properties files are loaded. Applications can provide
Logger.properties files
in:
- the META-INF directory of the Java archive (JAR) file for the application
- directories included in the class path of an application module
- directories included in the application class path
The properties file contains two categories of parameters, logger
control and logger data:
- Logger control information
- Minimum localization level: The minimum LogRecord level for which localization
is attempted
- Group: The logical group that this component belongs to
- Event factory: The Common Base Event template file to use with the event
factory. The naming convention for this template is the fully qualified component
name, with a file extension of .event.xml. For example,
a template that applies to the com.ibm.compXYZ package is called com.ibm.compXYZ.event.xml.
- Logger data information
- Product name
- Organization name
- Component name
- Extensions and additional properties
Sample Logger.properties file
In the following
sample, the com.ibm.xyz.MyEventFactory event factory is used by any loggers
in the com.ibm.websphere.abc package or any sub packages that do not override
this value in their configuration file.
com.ibm.websphere.abc.eventfactory=com.ibm.xyz.MyEventFactory