Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::logging::AcsLogLevel Class Reference

Collaboration diagram for alma::acs::logging::AcsLogLevel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AcsLogLevel (String name, int value, AcsLogLevelDefinition acsCoreLevel)
AcsLogLevelDefinition getAcsLevel ()
String getEntryName ()
int compareTo (AcsLogLevel l)

Static Public Member Functions

AcsLogLevel fromAcsCoreLevel (AcsLogLevelDefinition acsCoreLevel)
AcsLogLevel getNativeLevel (Level level)

Static Public Attributes

final AcsLogLevel TRACE = new AcsLogLevel("TRACE", Level.FINEST.intValue(), AcsLogLevelDefinition.TRACE)
final AcsLogLevel DEBUG = new AcsLogLevel("DEBUG", Level.CONFIG.intValue(), AcsLogLevelDefinition.DEBUG)
final AcsLogLevel INFO = new AcsLogLevel("INFO", Level.INFO.intValue(), AcsLogLevelDefinition.INFO)
final AcsLogLevel NOTICE = new AcsLogLevel("NOTICE", 801, AcsLogLevelDefinition.NOTICE)
final AcsLogLevel WARNING = new AcsLogLevel("WARNING", Level.WARNING.intValue(), AcsLogLevelDefinition.WARNING)
final AcsLogLevel ERROR = new AcsLogLevel("ERROR", 901, AcsLogLevelDefinition.ERROR)
final AcsLogLevel CRITICAL = new AcsLogLevel("CRITICAL", 902, AcsLogLevelDefinition.CRITICAL)
final AcsLogLevel ALERT = new AcsLogLevel("ALERT", 903, AcsLogLevelDefinition.ALERT)
final AcsLogLevel EMERGENCY = new AcsLogLevel("EMERGENCY", Level.SEVERE.intValue(), AcsLogLevelDefinition.EMERGENCY)
final AcsLogLevel OFF = new AcsLogLevel(Level.OFF.getName(), Level.OFF.intValue(), AcsLogLevelDefinition.OFF)

Static Package Functions

void printMappings (PrintStream ps)

Private Attributes

final AcsLogLevelDefinition acsCoreLevel
String entryName = null

Static Private Attributes

final String ACS_BUNDLE_NAME = AcsLogLevel.class.getPackage().getName()
TreeSet< AcsLogLevelknown = new TreeSet<AcsLogLevel>()
Map< Level, AcsLogLevellookup = new HashMap<Level AcsLogLevel>()

Detailed Description

Defines ACS specific logging levels. Also provides non-ACS level, which includes set of standard logging and possibly other vendor levels, to ACS level mapping. Maps Java-specific levels to ACS specific levels.

Although an OFF level is not mentioned in the Acs documentation, it is included for the purpose of dealing with bad levels as well as of blocking logging.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@


Constructor & Destructor Documentation

alma::acs::logging::AcsLogLevel::AcsLogLevel String  name,
int  value,
AcsLogLevelDefinition  acsCoreLevel
[inline]
 

Create a named Level with a given integer value.

Parameters:
name the name of the Level, for example "INFO".
value an integer value for the level.


Member Function Documentation

int alma::acs::logging::AcsLogLevel::compareTo AcsLogLevel  l  )  [inline]
 

Compares the level with the specified level for order.

See also:
java.lang.Comparable#compareTo(Object)

AcsLogLevel alma::acs::logging::AcsLogLevel::fromAcsCoreLevel AcsLogLevelDefinition  acsCoreLevel  )  [inline, static]
 

Converts an ACS core log level (as defined in ACS, Unix or similar) to the matching AcsLogLevel. If no AcsLogLevel directly corresponds to the given core level, then the AcsLogLevel whose associated acsCoreLevel is >= the given core level is chosen.

: In the past the acsCoreLevel param was an int, in which case the iteration over "known" level list made sense. Now that these are enums we should translate more directly.

Parameters:
acsCoreLevel 
Returns:

AcsLogLevelDefinition alma::acs::logging::AcsLogLevel::getAcsLevel  )  [inline]
 

Returns the corresponding ACS core level, which is a small positive integer defined as "priority" in the ACS logging and archiving architecture document and coded in IDL (see alma.AcsLogging.alma.LogLevels.WARNING_NAME and similar constants).

This level is different from the JDK-style level, which can be any integer.

Returns:
ACS core level

String alma::acs::logging::AcsLogLevel::getEntryName  )  [inline]
 

Returns the ACS XML level entryName.

Returns:
ACS XML level entryName

AcsLogLevel alma::acs::logging::AcsLogLevel::getNativeLevel Level  level  )  [inline, static]
 

Maps any (JDK or ACS) level to an ACS native level.

Parameters:
level any level
Returns:
native level, can be null if no native level is found or if level==Level.OFF

void alma::acs::logging::AcsLogLevel::printMappings PrintStream  ps  )  [inline, static, package]
 

This method should only be used to generate documentation about the various level mappings in use.

Parameters:
ps The PrintStream to print to, e.g. System.out


Member Data Documentation

final String alma::acs::logging::AcsLogLevel::ACS_BUNDLE_NAME = AcsLogLevel.class.getPackage().getName() [static, private]
 

The resource bundle name to be used in localizing ACS level name.

final AcsLogLevelDefinition alma::acs::logging::AcsLogLevel::acsCoreLevel [private]
 

The ACS error system defined level (small integer) which this JDK-style level maps to

final AcsLogLevel alma::acs::logging::AcsLogLevel::ALERT = new AcsLogLevel("ALERT", 903, AcsLogLevelDefinition.ALERT) [static]
 

A condition that should be corrected immediately, such as a corrupted system database. TODO: use something like 980 instead of 903 to allow other levels between ERROR and ALERT

final AcsLogLevel alma::acs::logging::AcsLogLevel::CRITICAL = new AcsLogLevel("CRITICAL", 902, AcsLogLevelDefinition.CRITICAL) [static]
 

Critical conditions, such as hard device errors. TODO: use something like 960 instead of 902 to allow other levels between CRITICAL and ERROR

final AcsLogLevel alma::acs::logging::AcsLogLevel::DEBUG = new AcsLogLevel("DEBUG", Level.CONFIG.intValue(), AcsLogLevelDefinition.DEBUG) [static]
 

Messages that contain information normally of use only when debugging a program.

final AcsLogLevel alma::acs::logging::AcsLogLevel::EMERGENCY = new AcsLogLevel("EMERGENCY", Level.SEVERE.intValue(), AcsLogLevelDefinition.EMERGENCY) [static]
 

A panic condition. This is normally broadcast to all users.

String alma::acs::logging::AcsLogLevel::entryName = null [private]
 

XML Entry name.

final AcsLogLevel alma::acs::logging::AcsLogLevel::ERROR = new AcsLogLevel("ERROR", 901, AcsLogLevelDefinition.ERROR) [static]
 

Error messages. TODO: use something like 930 instead of 901 to allow other levels between ERROR and WARNING

final AcsLogLevel alma::acs::logging::AcsLogLevel::INFO = new AcsLogLevel("INFO", Level.INFO.intValue(), AcsLogLevelDefinition.INFO) [static]
 

Informational messages.

TreeSet<AcsLogLevel> alma::acs::logging::AcsLogLevel::known = new TreeSet<AcsLogLevel>() [static, private]
 

List of all ACS levels, sorted automatically with lowest log level first.

Map<Level, AcsLogLevel> alma::acs::logging::AcsLogLevel::lookup = new HashMap<Level AcsLogLevel>() [static, private]
 

Fast lookup table mapping.

final AcsLogLevel alma::acs::logging::AcsLogLevel::NOTICE = new AcsLogLevel("NOTICE", 801, AcsLogLevelDefinition.NOTICE) [static]
 

Conditions that are not error conditions, but that may require special handling. TODO: use something like 850 instead of 801 to allow other levels between INFO and NOTICE

final AcsLogLevel alma::acs::logging::AcsLogLevel::OFF = new AcsLogLevel(Level.OFF.getName(), Level.OFF.intValue(), AcsLogLevelDefinition.OFF) [static]
 

Level not to be used for actual logging, but to set log levels for filtering. Overwrites/hides Level.OFF.

final AcsLogLevel alma::acs::logging::AcsLogLevel::TRACE = new AcsLogLevel("TRACE", Level.FINEST.intValue(), AcsLogLevelDefinition.TRACE) [static]
 

Messages indicating function-calling sequence.

final AcsLogLevel alma::acs::logging::AcsLogLevel::WARNING = new AcsLogLevel("WARNING", Level.WARNING.intValue(), AcsLogLevelDefinition.WARNING) [static]
 

Warning messages.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:38 2009 for ACS Java API by doxygen 1.3.8