Use the constants provided directly:
● Severity.DEBUG
● Severity.PATH
● Severity.INFO
● Severity.WARNING
● Severity.ERROR
● Severity.FATAL
● Severity.ALL
● Severity.NONE.
For more information about the various severity level definitions, see Appendix A.
Normally, you assign a severity to the source using: loc.setEffectiveSeverity(Severity.INFO). Any messages with severity lower than INFO will be discarded, others will be directed to the destination.
When you assign severity to the parent, its children automatically inherit this severity.
static final Location loc = Location.getLocation(com.sap.fooPackage); loc.setEffectiveSeverity(Severity.INFO); |
If you have, for example, a children location com.sap.fooPackage.Class1, it has already inherited the severity INFO.
For more information, see Hierarchical Severity Inheritance.
By default, the severity level of the source object is SEVERITY.NONE. Therefore, you can enable the output methods in the source code.
More information: