Consider the following, where explicit severity has not been set for com.sapmarkets.foo, but the range has been defined as:
static final Location loc = Location.getLocation(com.sapmarkets.foo); loc.setMinimumSeverity(Severity.DEBUG); loc.setMaximumSeverity(Severity.WARNING); |
● When the parent com.sapmarkets is explicitly assigned with Severity.FATAL, this severity is not inherited directly by com.sapmarkets.foo, since its ceiling threshold denies it. Instead, com.sapmarkets.foo gets the ceiling threshold Severity.WARNING.
● The same applies to the floor threshold. That is, any severity of the parent that is lower than Severity.DEBUG is ignored.
● The parent’s severity can overwrite the child’s if it is in the child’s severity range.
Assigning explicit severity setEffectiveSeverity(Severity.INFO) automatically overwrites the value of both MinimumSeverity and MaximumSeverity to Severity.INFO.
The tables below represent the different possibilities:
A Default Setting
Location/Category |
MaximumSeverity |
MinimumSeverity |
Resulting (Effective)Severity |
Description |
com.sapmarkets |
NONE |
ALL |
NONE |
default |
com.sapmarkets.foo1 |
NONE |
ALL |
NONE |
default |
com.sapmarkets.foo1.child1 |
NONE |
ALL |
NONE |
Default |
com.sapmarkets.foo2 |
NONE |
ALL |
NONE |
Default |
com.sapmarkets.foo2.child1 |
NONE |
ALL |
NONE |
default |
Scenario 1
Location/Category |
MaximumSeverity |
MinimumSeverity |
Resulting (Effective)Severity |
Description |
com.sapmarkets |
WARNING |
WARNING |
WARNING |
setEffectiveSeverity = WARNING |
com.sapmarkets.foo1 |
FATAL |
ALL |
WARNING |
setMaximumSeverity = FATAL |
com.sapmarkets.foo1.child1 |
NONE |
ALL |
WARNING |
|
com.sapmarkets.foo2 |
NONE |
ALL |
WARNING |
|
com.sapmarkets.foo2.child1 |
INFO |
ALL |
INFO |
setMaximumSeverity = INFO |
Scenario 2
Location/Category |
MaximumSeverity |
MinimumSeverity |
Resulting (Effective)Severity |
Description |
com.sapmarkets |
INFO |
INFO |
INFO |
setEffectiveSeverity = WARNING |
com.sapmarkets.foo1 |
FATAL |
FATAL |
FATAL |
setEffetiveSeverity = FATAL |
com.sapmarkets.foo1.child1 |
NONE |
ALL |
FATAL |
|
com.sapmarkets.foo2 |
NONE |
ALL |
INFO |
|
com.sapmarkets.foo2.child1 |
FATAL |
WARNING |
WARNING |
setMinimumSeverity = WARNING |