Show TOC

Support of Periodic ReloadingLocate this document in the navigation structure

Use

The SAP Logging API provides options for dealing with log assignment (additive) with periodic reloading. This section covers only the general behavior, not the technical details.

The use of an optional '+', for example:

com.sapmarkets.foo.logs = +log[Console]
         

The general rule: If a new log(s) configuration is without a '+' sign, the already assigned logs of the log controller are discarded. While, with the '+' sign, the new logs are added to the existing list of logs.

Features

Configuration Unchanged

When the configuration remains unchanged (which is typical for a defined stable configuration), the use of '+' sign is not necessary.

No further action is done and the already attached objects are still attached. This avoids loss of state of the attached objects.

Configuration Changed

You have assigned logX to a location. To change the destination to logY in the next reloading, proceed as follows in the configuration file:

com.sapmarkets.foo.logs = logY
            

logX is removed.

To add to the existing logX:

com.sapmarkets.foo.logs = +logY
            

Both logX and logY persist.

Changing properties mainly applies to the FileLog as it has a number of attributes. The FileLog is identified by its 'pattern'. Therefore, a new pattern means a new log. This has a behavior similar to changing log destination and adding log destination. The '+' sign is important.

If the changes are on the other attributes, for example limit or cnt , the '+' is not significant; no new FileLog is created. The existing FileLog remains and is modified with the corresponding new attribute values.

Recommendation

We recommend that you use the '+' sign only for log assignments.