Change Output Logs / Filters
The design of the logging framework makes the configuration flexible. You can, for example, change the log destination assignment to a source object. The assignment of logs to the source objects is additive. This applies to the filter assignment too. For more information, see Hierarchical Destination Inheritance.
Adding an additional output destination is straightforward. However, if you need to switch the output destination from a console to a file, you must include instructions to remove the ConsoleLog from the source object and then assign a FileLog to it. The APIs that support this, are:

_loc.removeLog(<a specific log>); |
and then,
_loc.addLog(<the new log>); |
For filters, the APIs are similar:
_loc.removeFilter(<a specific filter>); |
and then,
_loc.addFilter(<the new filter>); |
Eventually, an update of this kind is very likely to be done with the configuration file. Changes to logging properties during runtime are also supported.
There is special syntax to deal with additive attributes. For more information, see Support of Periodic Reloading.

log[File] = FileLog log[File].pattern = %t/trace.log log[File].formatter = ListFormatter com.sapmarkets.logs = log[File] ## (1) in the next round, user could switch the output to Console: com.sapmarkets.logs = ConsoleLog ## (2) or you can add additional console ouput: com.sapmarkets.logs = + ConsoleLog |
More information: