+

Search Tips   |   Advanced Search

 

Logger.properties file for configuring logger settings

 

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.

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 properties file contains two categories of parameters, logger control and logger data:

 

Syntax of the Logger.properties file

Use the following syntax to set logger properties: <logger base name>.<property>=value

where: logger base name is the starting part of the logger name to which the property applies. All loggers with names starting with this string have the property applied.property is one of the following 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

 

Group Logger.properties file

In the following example, the group is MyTraceGroup and the components are com.ibm.stuff and com.ibm.morestuff:

com.ibm.stuff.group=MyTraceGroup                                       com.ibm.morestuff.group=MyTraceGroup




 

Related tasks


Use loggers in an application

 

Related Reference


Example: Sample security policy for logging

 

Reference topic