BoilerPlate-LightweightLogging Service OMG Formal/03-11-03 |
#include <LWLoggingPostORBInitCommand.h>
Inheritance diagram for LWLoggingPostORBInitCommand:
Use this class to initialize the logging service for a Lightweight Logging Service client. The LWLoggingPostORBInitCommand is a wrapper for the LogProducer interface. Install an instance of this class into BoilerPlate's OrbInit as a PostORBInitCommand using ORBInit::addPostORBInitCommand.
The LWLoggingPostORBInitCommand requires an initialized ORB because this Log client uses the NameService to locate the bound referenc of the LogProducer interface. ORBInit uses the LWLoggingPostORBInitCommand::execute operation to pass the ORB.
A client LogProducer has a Producer Id which is set in the ctor or in the execute operation. Once set the Producer Id is immutable. The producer id appears in the Log Service log. It is passed to the Log Service on each invocation along with a Producer Name. The Producer Id identifies the application and the Producer Name identifies the unit of execution that creates the log message. For example, an application has a Producer Id of TheApplication. If TheApplication has a class Foo with an operation doSomething, then the Producer name might be Foo::doSomething.
Classes using this implementation of BPLog are not aware that they are actually talking to CORBA. Log clients use a reference to a BPLog that is acquired by calling the static BPLog::log. CORBA semantics do not leak into the business logic. Developers can interchange the LWLogging PostORBInitCommand and the BPLoggingStub without changing the code that interfaces with the Log. The LWLoggingPostORBInitCommand intercepts the call and translates the message into the correct CORBA structures defined by the CosLW_Log IDL.
is a name used for all Producer bindings. Each Producer will bind under a context with the log id as its name.Producer
Public Member Functions | |
LWLoggingPostORBInitCommand (const char *producer_name) | |
LWLoggingPostORBInitCommand () | |
virtual | ~LWLoggingPostORBInitCommand () |
virtual bool | execute (CORBA::ORB_ptr orb, ConfMap &config_map) |
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) |
Static Public Member Functions | |
BPLog & | log () |
Protected Member Functions | |
void | log (BPLog *log) |
|
Initialize the Logging client Initialize the Logging client subsystem. Initialization does not contact the LWL Service. It only sets the producer name
|
|
Initialize the Logging client Initialize the Logging client subsystem. Initialization does not contact the LWL Service. |
|
DTOR |
|
Covers the PostORBInitCommandContract Called by BoilerPlate's OrbInit during CORBA initialization after the ORB has been initialized. The config_map is used to get the LogProducer reference from the NamingService. Use -BPlogproducertree=<the/log/producer/tree/objname>. The context tree should be documented in the BP-LWL Service start script.
|
|
Set the static Log pointer Used by the implementation to set the pointer to the Log
|
|
Obtain the interface to the log Producer Clients obtain a reference to the Logging mechanism by calling BPLog::log().
|
|
Log an Administrative event An administrative event includes events like startup and shutdown. It also includes requests that change the application's configuration
Implements BPLog. |
|
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
Implements BPLog. |
|
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.
Implements BPLog. |
|
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
Implements BPLog. |
|
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.
Implements BPLog. |
|
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.
Implements BPLog. |
|
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
Implements BPLog. |
|
Log a security alarm A security alarm is a notification that something has attempted to violate the application's security mechanism
Implements BPLog. |
|
Log a statistic report A statistic report includes messages about the applications performance and resources
Implements BPLog. |
|
Log a Usage Error Usage Errors include illegal argruments or arguments that would result in an illegal state
Implements BPLog. |
Copyright © BoilerPlate.org | Generated on Tue Nov 30 16:33:15 2004 for BoilerPlate CosLightweightLogging Service by 1.3.7 |