Show TOC Start of Content Area

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

Use the following piece of code to load the configuration data from a properties file:

This graphic is explained in the accompanying text

This code is mostly used in the initialization stage:

_propConfig = new PropertiesConfigurator(

         new File("logging.properties"));

_propConfig.configure();

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

Each application stores its property files in its own properties management directory. If the logging tool cannot locate the properties file (for example, the path is wrong path or it does not exist), an error message is prompted and the application continues to run without logging being switched on.

More information about the error handling concept: Administrative Issues.

Optional Periodic Reloading

An optional command exists where 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.

The API for doing this, for example reloading the properties file every 30 minutes, is:

Syntax

_propConfig.setPeriodicity(30);

 

End of Content Area