Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions

alma.acs.logging.domainspecific.AudienceLogger Class Reference

Inheritance diagram for alma.acs.logging.domainspecific.AudienceLogger:
alma.acs.logging.domainspecific.DeveloperLogger alma.acs.logging.domainspecific.OperatorLogger alma.acs.logging.domainspecific.ScienceLogger

List of all members.

Public Types

enum  Audience {
  OPERATOR = (alma.log_audience.OPERATOR.value), DEVELOPER = (alma.log_audience.DEVELOPER.value), SYSADMIN = (alma.log_audience.SYSADMIN.value), DBA = (alma.log_audience.DBA.value),
  SCILOG = (alma.log_audience.SCILOG.value), NO_AUDIENCE = (alma.log_audience.NO_AUDIENCE.value)
}

Public Member Functions

AcsLogger getLogger ()
void log (Level level, String msg, Throwable thr)
void severe (String msg)
void warning (String msg)
void info (String msg)
void config (String msg)
void fine (String msg)
void finer (String msg)
void finest (String msg)

Static Public Member Functions

static void log (Level level, String msg, Throwable thr, AcsLogger acsLogger, Audience audience)

Protected Member Functions

 AudienceLogger (AcsLogger logger, Audience audience)

Static Protected Member Functions

static void log (Level level, String msg, Throwable thr, AcsLogger acsLogger, Audience audience, Class<?extends AudienceLogger > staticLoggerClass)

Detailed Description

Base class for the various fixed-audience loggers. As of ACS 9.0, the following audience types are defined in acscommon.idl: const string OPERATOR = "Operator";
const string DEVELOPER = "Developer";
const string SYSADMIN = "Sysadmin";
const string DBA = "DBA";
const string SCILOG = "SciLog";
const string NO_AUDIENCE = "";
but we only provide the convenience wrappers for the most popular audiences: Operator, Developer, SciLog. For other audiences, the static method log(Level, String, Throwable, AcsLogger, Audience) can be used, or AcsLogger#logToAudience(Level, String, String) with a generic audience string which is especially useful when a new audience type gets introduced and ACS has not added support for it yet.

The audience loggers are wrappers around an AcsLogger, calling AcsLogger#logToAudience(Level, String, String) with a fixed audience string that corresponds to an Audience enum. The goal is to keep the "audience" concept generic in AcsLogger, and confine the usage of concrete alma audience types to this subpackage, e.g. ScienceLogger.

See http://jira.alma.cl/browse/COMP-3130 about adopting this code from CONTROL/Common/Define/src/alma/Control/Common/*Logger.java to ACS.


Member Enumeration Documentation

Enumerator:
OPERATOR 
DEVELOPER 
SYSADMIN 
DBA 
SCILOG 
NO_AUDIENCE 

Constructor & Destructor Documentation

alma.acs.logging.domainspecific.AudienceLogger.AudienceLogger ( AcsLogger  logger,
Audience  audience 
) [protected]

Member Function Documentation

void alma.acs.logging.domainspecific.AudienceLogger.config ( String  msg  ) 
void alma.acs.logging.domainspecific.AudienceLogger.fine ( String  msg  ) 
void alma.acs.logging.domainspecific.AudienceLogger.finer ( String  msg  ) 
void alma.acs.logging.domainspecific.AudienceLogger.finest ( String  msg  ) 
AcsLogger alma.acs.logging.domainspecific.AudienceLogger.getLogger (  ) 
void alma.acs.logging.domainspecific.AudienceLogger.info ( String  msg  ) 
void alma.acs.logging.domainspecific.AudienceLogger.log ( Level  level,
String  msg,
Throwable  thr 
)

Log with throwable

References alma.acs.logging.AcsLogger.logToAudience().

static void alma.acs.logging.domainspecific.AudienceLogger.log ( Level  level,
String  msg,
Throwable  thr,
AcsLogger  acsLogger,
Audience  audience 
) [static]

Static log method, useful for rare audience types that don't have their own subclass (yet).

References alma.acs.logging.AcsLogger.addLoggerClass(), and alma.acs.logging.AcsLogger.logToAudience().

static void alma.acs.logging.domainspecific.AudienceLogger.log ( Level  level,
String  msg,
Throwable  thr,
AcsLogger  acsLogger,
Audience  audience,
Class<?extends AudienceLogger staticLoggerClass 
) [static, protected]

To be called by static methods of subclasses only.

References alma.acs.logging.AcsLogger.addLoggerClass(), and alma.acs.logging.AcsLogger.logToAudience().

void alma.acs.logging.domainspecific.AudienceLogger.severe ( String  msg  ) 
void alma.acs.logging.domainspecific.AudienceLogger.warning ( String  msg  ) 

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties