Show TOC Start of Content Area

Procedure documentation Calling the Configuration Tool  Locate the document in its SAP Library structure

Procedure

Use the following piece of code (usually in the initialization stage) to load the configuration data from a “.properties file:

This graphic is explained in the accompanying text

_propConfig = new PropertiesConfigurator(

         new File("logging.properties"));

_propConfig.configure();

 

The example shown above reads from a “.properties“ file named logging.properties in the current directory, and triggers the configuration as specified in the file.

Each application stores its “.properties” files in its own directory. If the logging tool cannot locate the “.properties” file, an error message is prompted and the application continues to run without logging being switched on (assuming all configuration is done through the “.properties file”).

For more information about the error handling concept, see Administrative Issues.

Optional Periodic Reloading

You can specify a periodic value (in minutes) to read and load the “.properties” file again and to scan for a new configuration automatically. This feature is useful especially in cases when a log console is available.

Example

For example, to reload the properties file for every 30 minutes, use:

This graphic is explained in the accompanying text

_propConfig.setPeriodicity(30);

 

End of Content Area