Show TOC Start of Content Area

Background documentation Support of Periodic Reloading  Locate the document in its SAP Library 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:

Syntax

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

 

The general rule of thumb – with the presence of a new log(s) configuration, without the ‘+’, the logs of the log controller that are already assigned are discarded, while with the ‘+’, the new logs are added to the existing list of logs.

Configuration Unchanged

When the configuration remains unchanged (which is typical once a stable configuration has been defined), the use of ‘+’ is not significant. No further action is done and the objects that were already attached are still attached. This avoids the 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:

Syntax

com.sapmarkets.foo.logs = logY

logX is removed.

To add to the existing logX:

com.sapmarkets.foo.logs = +logY

Both logX and logY persist.

The last type of modification (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 ‘+’ is important.

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

Recommendation

Do not use the ‘+’, or use it for all occurrences of the log assignments.

 

End of Content Area