Show TOC

Background documentationSupport of Periodic Reloading Locate this document in the navigation structure

 

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 Syntax

  1. com.sapmarkets.foo.logs = +log[Console]
End of the code.

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:

Syntax Syntax

  1. com.sapmarkets.foo.logs = logY
End of the code.

logX is removed.

To add to the existing logX:

Syntax Syntax

  1. com.sapmarkets.foo.logs = +logY
End of the code.

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 Recommendation

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

End of the recommendation.