SourcePro 11.1 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
The handle to a singleton trace event manager implementation. More...
#include <rw/trace/RWTraceManager.h>
Public Member Functions | |
RWTraceManager (void) | |
RWTraceManager (RWStaticCtor) | |
RWTraceManager (const RWTraceManager &second) | |
~RWTraceManager (void) | |
RWTraceEventSeverity | getTraceLevel () const |
void | setTraceLevel (RWTraceEventSeverity level) |
Static Public Member Functions | |
static RWTraceManager | instance (void) |
static void | disconnectClient (void) |
RWTraceManager is the handle for the singleton trace event manager implementation, which accepts and forwards trace information to the connected client.
An exception is thrown if one attempts to add a client when there is one present already.
If there is no client connected, the manager buffers events. The maximum number of buffered events defaults to 100. If the maximum number of buffered events is reached, the oldest event is removed from the buffer to make room for the newest one.
The environment variable RW_TRACE_BUFFER_SIZE
can be used to specify the buffer's size. Once a client is connected, the manager immediately forwards all buffered trace events, and buffering ceases. Buffering resumes when the client is disconnected.
The environment variable RW_TRACE_LEVEL
can be used to specify the minimum severity level for event generation. The default severity level is INFO
. The environment variable can be set to one of the following: FATAL
, ERROR
, WARNING
, INFO
, TEST
, DEBUG
, ENTRY
, NONE
.
The singleton trace event manager implementation is reference-counted, to ensure that it will not be destroyed while a client is still connected to it.
RWTraceManager::RWTraceManager | ( | void | ) |
Default constructor. Always returns a handle whose body is the singleton trace event manager implementation.
RWTraceManager::RWTraceManager | ( | RWStaticCtor | ) |
Constructs a global static handle instance (may be used before being constructed).
RWTraceManager::RWTraceManager | ( | const RWTraceManager & | second | ) |
Attaches to and increments the reference count on second 's body.
RWTraceManager::~RWTraceManager | ( | void | ) |
Destructor.
static void RWTraceManager::disconnectClient | ( | void | ) | [static] |
Tells the client (or filter) connected to the trace manager singleton to disconnect itself.
Reimplemented from RWTraceSingleClientFilter.
RWTraceEventSeverity RWTraceManager::getTraceLevel | ( | ) | const [inline] |
Returns the trace manager's runtime severity level.
static RWTraceManager RWTraceManager::instance | ( | void | ) | [static] |
Static method that returns a handle to the manager. Initialization is performed, if not done already. This includes setting the maximum buffer size if RW_TRACE_BUFFER_SIZE
has a positive numeric value.
void RWTraceManager::setTraceLevel | ( | RWTraceEventSeverity | level | ) | [inline] |
Sets the trace manager's runtime severity level.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.