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

BPLoggingStub Class Reference
[LWLogging Producer Client]

#include <BPLoggingStub.h>

Inheritance diagram for BPLoggingStub:

Inheritance graph
[legend]
Collaboration diagram for BPLoggingStub:

Collaboration graph
[legend]
List of all members.

Detailed Description

A stub for the BPLog contract.

Author
knoxy
Revision
1.1
Date
2004/10/26 02:58:26

This stub enables developers to do unit testing without having to run the Lightweight Logging service. To switch from this stub to the service, change the type of PostORBInitCommand to the LWLoggingPostORBInitCommand and recompile.


Public Member Functions

 BPLoggingStub ()
 BPLoggingStub (const char *filename)
virtual ~BPLoggingStub ()
virtual void logSecurityAlarm (const char *producerId, const char *msg)
virtual void logFailureAlarm (const char *producerId, const char *msg)
virtual void logDegradedAlarm (const char *producerId, const char *msg)
virtual void logExceptionError (const char *producerId, const char *msg)
virtual void logFlowControlError (const char *producerId, const char *msg)
virtual void logRangeError (const char *producerId, const char *msg)
virtual void logUsageError (const char *producerId, const char *msg)
virtual void logAdministrativeEvent (const char *producerId, const char *msg)
virtual void logStatisticReport (const char *producerId, const char *msg)
virtual void logDebugReport (const char *producerId, const char *msg, unsigned short debuglevel=10)
virtual bool execute (CORBA::ORB_ptr orb, ConfMap &config_map)

Static Public Member Functions

BPLoglog ()

Protected Member Functions

void log (BPLog *log)


Constructor & Destructor Documentation

BPLoggingStub::BPLoggingStub  ) 
 

Default ctor

BPLoggingStub::BPLoggingStub const char *  filename  ) 
 

ctor

Create a stub to write to a local file

Parameters:
filename - The name of the local file

virtual BPLoggingStub::~BPLoggingStub  )  [virtual]
 

dtor


Member Function Documentation

virtual bool BPLoggingStub::execute CORBA::ORB_ptr  orb,
ConfMap &  config_map
[virtual]
 

Implementation for PostORBCommandInit

Parameters:
orb - The procesess ORB
config_map - A map of -BP command line values
Returns:
bool True is successful, False otherwise.

void BPLog::log BPLog log  )  [inline, protected, inherited]
 

Set the static Log pointer

Used by the implementation to set the pointer to the Log

Parameters:
log - The pointer to the Log implementation

BPLog& BPLog::log  )  [inline, static, inherited]
 

Obtain the interface to the log

Producer Clients obtain a reference to the Logging mechanism by calling BPLog::log().

Note:
The reference is not valid until after the ORB has been initialized.

virtual void BPLoggingStub::logAdministrativeEvent const char *  producerId,
const char *  msg
[virtual]
 

Log an Administrative event

An administrative event includes events like startup and shutdown. It also includes requests that change the application's configuration

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logDebugReport const char *  producerId,
const char *  msg,
unsigned short  debuglevel = 10
[virtual]
 

Log a debug message

A general debugging hook. The debuglevel parm must be greater than 9. If the debug level is less than 10, the operation will add 10 to the inbound level

Parameters:
producerId - the name of the producer
msg - The message to log
debuglevel - The debug level
Invariant:
debuglevel < 10 ? debuglevel += 10

debuglevel > 26 ? debuglevel = 26

Implements BPLog.

virtual void BPLoggingStub::logDegradedAlarm const char *  producerId,
const char *  msg
[virtual]
 

Log a Degraded Alarm

A degraded alarm is raised when the system is in a state the inhibits it from performing at peak effeciency. For example, if the system can perform some of its functions but not all of its functions, it is in a degraded state.

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logExceptionError const char *  producerId,
const char *  msg
[virtual]
 

Log an Exception Error

Use this operation to log exceptions as they are generated. Exceptions should be logged at points where they are generated, rethrown, or translated into new exception types. No information should be lost

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logFailureAlarm const char *  producerId,
const char *  msg
[virtual]
 

Log a Failure Alarm

A Failure Alarm is raised when the application fails to create, find, or initialize an external service like a database connection, etc.

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logFlowControlError const char *  producerId,
const char *  msg
[virtual]
 

Log a Flow control error

A flow control error occurs if a thread exhausts the control branches of a flow without falling into one of the branches.

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logRangeError const char *  producerId,
const char *  msg
[virtual]
 

Log a Range Error

A Range Error occurs when a value is expected to be within a certain constraint but either exceeds or preceeds the range

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logSecurityAlarm const char *  producerId,
const char *  msg
[virtual]
 

Log a security alarm

A security alarm is a notification that something has attempted to violate the application's security mechanism

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logStatisticReport const char *  producerId,
const char *  msg
[virtual]
 

Log a statistic report

A statistic report includes messages about the applications performance and resources

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.

virtual void BPLoggingStub::logUsageError const char *  producerId,
const char *  msg
[virtual]
 

Log a Usage Error

Usage Errors include illegal argruments or arguments that would result in an illegal state

Parameters:
producerId - the name of the producer
msg - The message to log

Implements BPLog.


The documentation for this class was generated from the following file: