Package org.ops4j.pax.logging.spi
Interface PaxLevel
-
public interface PaxLevelFramework library agnostic representation of logging level. There are two uses of level concept:- detail level or importance of logging event
- threshold of the logging service, appender or destination, that allows to process or reject logging events with some level
LogServiceuse higher numerical values for less important logging events. Log4J1 andjava.util.logginguse higher numerical values for more important events. This interface is based on Log4J1 and:- the higher value (numerically) the more important the event is (higher severity)
INFOis higher thanDEBUG- when used as threshold, PaxLevel=INFO rejects events with level=DEBUG and level=TRACE.
- also, the higher the threshold the more events are rejected (less are processed).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetSyslogEquivalent()Return the syslog equivalent of this priority as an integer.booleanisGreaterOrEqual(PaxLevel r)Returnstrueif this level has a higher or equal level (is more important, has bigger severity) than the level passed as argument,falseotherwise.org.osgi.service.log.LogLeveltoLevel()ReturnsLogLevelrepresentation of this level.
-
-
-
Method Detail
-
isGreaterOrEqual
boolean isGreaterOrEqual(PaxLevel r)
Returnstrueif this level has a higher or equal level (is more important, has bigger severity) than the level passed as argument,falseotherwise.- Parameters:
r- the PaxLevel to compare with.- Returns:
- true if this level has a higher or equal level than the level passed as argument,
falseotherwise.
-
toLevel
org.osgi.service.log.LogLevel toLevel()
ReturnsLogLevelrepresentation of this level. InLogLevelenum, the higher the numerical value (ordinal of the enum), the less important is the logging event with given level. When used as threshold, the higher the numerical value, the less events are rejected (i.e., high threshold means process even less important events).
-
getSyslogEquivalent
int getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer. In Syslog (https://en.wikipedia.org/wiki/Syslog#Severity_level), higher numerical values indicate less important logging events.- Returns:
- the syslog equivalent of this priority as an integer.
-
-