blackboard.platform.log
Class LogService.Verbosity

java.lang.Object
  extended by blackboard.platform.log.LogService.Verbosity
All Implemented Interfaces:
java.io.Serializable
Enclosing interface:
LogService

public static final class LogService.Verbosity
extends java.lang.Object
implements java.io.Serializable

Enumeration of different log levels used in filtering log messages.

See Also:
Serialized Form

Field Summary
static LogService.Verbosity AUDIT
          Used to log messages that should always appear in the log.
static LogService.Verbosity DEBUG
          Used to log all messages.
static LogService.Verbosity DEFAULT
          Default is DEBUG; however this is typically over-ridden in the service configuration file.
static LogService.Verbosity ERROR
          Used to log messages resulting from system errors.
static LogService.Verbosity FATAL
          Used to log messages that cause severe disruption to the system.
static LogService.Verbosity INFORMATION
          Used to log messages that are not necessarily error conditions, but might be useful for diagnostic purposes.
static LogService.Verbosity WARNING
          Used to log messages that result from potentially erroneous conditions.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static LogService.Verbosity fromExternalString(java.lang.String level)
          Generates the proper enumerated object from a string representation.
static LogService.Verbosity fromInt(int level)
          Utility method to retrieve a predefined verbosity from the integer level
 int getLevelAsInt()
          Returns an integer representation of this verbosity.
 int hashCode()
           
 boolean implies(LogService.Verbosity v)
          Returns true if this verbosity implies that the other verbosity will be accepted by the logger.
 java.lang.String toExternalString()
          Maps enumerated type to a human readable string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FATAL

public static final LogService.Verbosity FATAL
Used to log messages that cause severe disruption to the system.


AUDIT

public static final LogService.Verbosity AUDIT
Used to log messages that should always appear in the log.


ERROR

public static final LogService.Verbosity ERROR
Used to log messages resulting from system errors.


WARNING

public static final LogService.Verbosity WARNING
Used to log messages that result from potentially erroneous conditions.


INFORMATION

public static final LogService.Verbosity INFORMATION
Used to log messages that are not necessarily error conditions, but might be useful for diagnostic purposes.


DEBUG

public static final LogService.Verbosity DEBUG
Used to log all messages.


DEFAULT

public static final LogService.Verbosity DEFAULT
Default is DEBUG; however this is typically over-ridden in the service configuration file.

Method Detail

getLevelAsInt

public int getLevelAsInt()
Returns an integer representation of this verbosity. Lower verbocities will have lower numbers.


toExternalString

public java.lang.String toExternalString()
Maps enumerated type to a human readable string.

Returns:
Lowercase string value for the specified log level.

implies

public boolean implies(LogService.Verbosity v)
Returns true if this verbosity implies that the other verbosity will be accepted by the logger. In other words, Verbosity.DEBUG implies Verbosity.ERROR since a Log set to Verbosity.DEBUG will log Verbosity.ERROR messages.

Parameters:
v - Verbosity to compare to
Returns:
True if a Log at this Verbosity will log messages at the other Verbosity

fromExternalString

public static LogService.Verbosity fromExternalString(java.lang.String level)
Generates the proper enumerated object from a string representation.

Parameters:
level - String representation
Returns:
Proper enumerated object

fromInt

public static LogService.Verbosity fromInt(int level)
Utility method to retrieve a predefined verbosity from the integer level

Parameters:
level - Integer level
Returns:
resolved Verbosity

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2012 Blackboard, Inc. All Rights Reserved.