!--a11y-->
Output
Resulting from Relative Severity 
1. Use the table below to elaborate (effectiveSeverity). What will be the result of the following code for each of the conditions listed? The example below will produce log messages with respect to a location:

Category cat = Category.getCategory("Objects/Management"); Location loc = Location.getLocation("com.sapmarkets.xxx.a"); cat.warningT(loc, methodname, "Error registering object {0}."); |
Regular: |
With Relative: |
Result, output enabled(with relative
‘loc’)? |
FATAL |
<…not set…> |
NO |
<…not set…> |
INFO |
YES |
FATAL |
INFO |
YES |
INFO |
ERROR |
YES |
2. Producing traces from a location with respect to a category:

Category cat = Category.getCategory("Objects/Management"); Location loc = Location.getLocation("com.sapmarkets.xxx.a");
loc.warningT(methodname, messageCode); loc.warning(cat, methodname, messageCode); |
Regular: |
With Relative: |
Result, output enabled (without relative
‘cat’)? |
Result, output enabled(with relative
‘cat’)? |
FATAL |
<…not set…> |
NO |
NO |
<…not set…> |
INFO |
NO |
YES |
FATAL |
INFO |
NO |
YES |
INFO |
ERROR |
YES |
YES |
When the output methods API denote a relative (or relatives), the logging framework tries to output the message simultaneously to both the log controller and its relative(s). The evaluations are independent and done separately. The results shown in the tables above are those for the log controller itself.
Whether the output is enabled at the relative totally depends on the configuration set by the relative itself, which at the same time evaluates the severity with respective to the log controller. If no explicit relative severity is configured by the relative, the situation becomes similar to the conditions listed in the table below.
Regular: |
With Relative: |
Output enabled for cat? |
Output enabled |
FATAL |
<…not set…> |
NO |
NO |
<…not set…> |
INFO |
YES |
NO |
FATAL |
INFO |
YES |
NO |
INFO |
ERROR |
YES |
NO |
In case the relative severity is also specified at the relative loc (assuming its own severity remains the default Severity.NONE value), consider the following data:
Regular: |
With Relative: |
At
loc: |
Output enabled by relative ‘loc’? |
FATAL |
<…not set…> |
<…not set…> |
NO |
<…not set…> |
INFO |
INFO |
YES |
FATAL |
INFO |
WARNING |
YES |
INFO |
ERROR |
ERROR |
NO |