Show TOC Start of Content Area

This graphic is explained in the accompanying text Hierarchical Severity Inheritance – Example Locate the document in its SAP Library structure

Consider the following, where explicit severity has not been set for com.sapmarkets.foo, but the range has been defined as:

This graphic is explained in the accompanying text

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 will not be inherited directly by com.sapmarkets.foo, because its ceiling threshold denies it. Instead, com.sapmarkets.foo will get the ceiling threshold Severity.WARNING. The same theory applies to the floor threshold. That is, any severity of the parent that is lower than Severity.DEBUG will be ignored.

Only when the parent’s severity falls between the severity range of the child can it overwrite the child’s severity with its own value.

This graphic is explained in the accompanying text

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

 

 

 

End of Content Area