!--a11y-->
Set Up /
Add Relative Severity 
The table below presents the API used for setting the relative severity:
Setting Relative Severity
Regular |
Location |
Category |
Comment |
setEffectiveSeverity(int severity) |
setEffectiveSeverity(Category relative, int severity) |
setEffectiveSeverity(Location relative, int severity) |
|
setEffectiveSeverity() |
setEffectiveSeverity(Category relative) |
setEffectiveSeverity(Location relative) |
Reset severity (with respect to the relative) |
setMaximumSeverity(int severity) |
setMaximumSeverity(Category relative, int severity) |
setMaximumSeverity(Location relative, int severity) |
|
setMaximumSeverity() |
setMaximumSeverity(Category relative) |
setMaximumSeverity(Location relative) |
Reset |
setMinimumSeverity(int severity) |
setMinimumSeverity(Category relative, int severity) |
setMinimumSeverity(Location relative, int severity) |
|
setMinimumSeverity() |
setMinimumSeverity(Category relative) |
setMinimumSeverity(Location relative) |
Reset |
The typical requirement is to assign a stricter severity in the primary source object and a more relaxed level tagged with a certain relative.
The relative severity is specific to the pair of the location and category. When you want to change or reset the relative severity, the relative has to be clearly indicated in the API.
The relative severity is unidirectional:
loc1.setEffectiveSeverity(cat1, Severity.INFO);
Relative severity is also hereditary. Descendants also inherit the relative severity assignment. The same logic of local restriction through the use of maximum (ceiling) and minimum (floor) severity limit is also applicable to the descendants. For more information, see Hierarchical Severity Inheritance.

The evaluation is always done with respective to the relative(s).
The severity of a log controller can be different when a relative severity (or severities) has been set. The rule of thumb is: inclined to a more relaxed setting. That is, the minimum severity of the two factors below will always win:
· Direct severity of itself;
· Severity related to its relative;
· If multiple relatives exist, the minimum of the relative severities wins;
This applies to all three types of severities shown in the table above: effective, maximum, and minimum. The following tables highlight the severity results both in cases of evaluating with and without a relative.
Regular: |
With Relative: |
Result: |
Result: |
Comments |
FATAL |
<…not set…> |
FATAL |
FATAL |
|
<…not set…> |
INFO |
NONE |
INFO |
|
FATAL |
INFO |
FATAL |
INFO |
|
INFO |
ERROR |
INFO |
INFO |
Not stricter |
Regular: |
With Relative: |
Result: |
Result: |
Comments |
FATAL |
<…nothing…> |
FATAL |
FATAL |
|
<…not set…> |
INFO |
NONE |
INFO |
|
FATAL |
INFO |
FATAL |
INFO |
|
INFO |
ERROR |
INFO |
INFO |
Not stricter |
Regular: |
With Relative: |
Result: |
Result: |
Comments |
FATAL |
<…nothing…> |
FATAL |
FATAL |
|
<…not set…> |
INFO |
NONE |
INFO |
|
FATAL |
INFO |
FATAL |
INFO |
|
INFO |
ERROR |
INFO |
INFO |
Not stricter |
The use of relative severity is fairly independent. It never affects the individual severity evaluation of the log controller itself. If you decide not to configure the output with respective to any relative, the relative severity assignment has no effect on the output. The result stays intact as listed in column three.