Class comb.logging.Level
Level class used to describe logging levels. The levels determine what types of events are logged to the appenders for example the if Level.ALL is used then all event will be logged, however if Level.INFO was used then ONLY INFO, WARN, ERROR, and FATAL events will be logged. To turn off logging for a logger use Level.OFF.
Not typically instantiated directly, but through staticly defined levels
Defined in: level.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
<static> |
comb.logging.Level.ALL
Level to allow logging of all events.
|
<static> |
comb.logging.Level.DEBUG
Logs only events debug or greater.
|
<static> |
comb.logging.Level.ERROR
Error or fatal events
|
<static> |
comb.logging.Level.FATAL
Only fatal events
|
<static> |
comb.logging.Level.INFO
Only info, or error related events
|
the numerical representation of this level.
|
|
the name of level.
|
|
<static> |
comb.logging.Level.OFF
No events will be logged.
|
<static> |
comb.logging.Level.TRACE
Like debug but provides a finer level of detail
|
<static> |
comb.logging.Level.WARN
Only warn or error related events
|
Method Attributes | Method Name and Description |
---|---|
<static> |
comb.logging.Level.addLevel(label, level)
Adds a new level to the Level object.
|
equals(level)
Determing if this level is equal to another level based off of the numerical rank.
|
|
isGreaterOrEqualToo(level)
Determing if this level is >= another level
|
|
<static> |
comb.logging.Level.toLevel(level, defaultLevel)
Converts a numerical or string representation of a level, if a default level is provided,
then if a level cannot be determined then the default level is used.
|
Class Detail
comb.logging.Level()
//Levels in ascending order comb.logging.Level.ALL comb.logging.Level.DEBUG comb.logging.Level.TRACE comb.logging.Level.INFO comb.logging.Level.WARN comb.logging.Level.ERROR comb.logging.Level.FATAL comb.logging.Level.OFF //or Level.getLevel("INFO");
Field Detail
<static>
comb.logging.Level.ALL
Level to allow logging of all events.
<static>
comb.logging.Level.DEBUG
Logs only events debug or greater.
<static>
comb.logging.Level.ERROR
Error or fatal events
<static>
comb.logging.Level.FATAL
Only fatal events
<static>
comb.logging.Level.INFO
Only info, or error related events
{Number}
level
the numerical representation of this level.
{String}
name
the name of level.
<static>
comb.logging.Level.OFF
No events will be logged.
<static>
comb.logging.Level.TRACE
Like debug but provides a finer level of detail
<static>
comb.logging.Level.WARN
Only warn or error related events
Method Detail
<static>
{undefined|comb.logging.Level}
comb.logging.Level.addLevel(label, level)
Adds a new level to the Level object.
logger = Logger.getLogger("my.logger"); //create the custom level Level.addLevel("custom_Level", 20); //now set the level on a logger logger.level = Level.CUSTOM_LEVEL;
- Parameters:
- {string} label
- the label of the level, Note: the label will be coverted to uppercase.
- {number} level
- the level of the level
- Returns:
- {undefined|comb.logging.Level} the level that was created.
{Boolean}
equals(level)
Determing if this level is equal to another level based off of the numerical rank.
- Parameters:
- {comb.logging.Level} level
- the level to compare
- Returns:
- {Boolean} true if this is equal to that false otherwise.
{Boolean}
isGreaterOrEqualToo(level)
Determing if this level is >= another level
- Parameters:
- {comb.logging.Level} level
- the level to test against
- Returns:
- {Boolean} true if this is >= false otherwise.
<static>
{comb.logging.Level|null}
comb.logging.Level.toLevel(level, defaultLevel)
Converts a numerical or string representation of a level, if a default level is provided,
then if a level cannot be determined then the default level is used.
- Parameters:
- {Number|String|comb.logging.Level} level
- the level to try to convert
- {comb.logging.Level} defaultLevel Optional
- default level to use if one cannot be determined,
- Returns:
- {comb.logging.Level|null} returns a level if one can be determined null otherwise.