Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWTraceLevelFilter

Module:  Threads   Package:  Execution Tracing


RWTraceLevelFilter RWTraceSingleClientfilter RWTraceEventFilter...... RWTraceEventClient

Local Index

Members

Header File

#include <rw/trace/RWTraceLevelFilter.h>

Description

RWTraceLevelFilter is a single-client filter that lets only events of the supplied severity level or higher pass through.

Example

The following is a description of each program line:

//1Compile in all trace macros by setting the user trace level macro to 8. This line sets the maximum trace level to compile into the code. To compile in all the trace macros, the level is set to the maximum 8 (Entry/Exit). You could also define the trace level on the command line for your compiler, using the flag -DRW_USER_TRACE_LEVEL=8.
//2Create a normal std::ostream client to display the trace information.
//3Instantiate an RWTraceLevelFilter. The constructor takes the maximum level of trace messages to pass through. You can pass an integer level number (see Section 6.1.3 of the Threads Module User's Guide) or use one of the symbolic constants, as in this line. Pass 0 to filter out all trace messages.
//4Connect the client to the level filter.
//5Then connect the filter to the trace manager.
//6Declare the function as traceable, so you can use trace event generation macros in this function.
//7Change the cutoff level on the level filter, using the setLevel() function.

The symbolic constants referred to in line //3 are defined in the file
rw/trace/RWTraceEventSeverity.h. They cannot be used when setting the RW_USER_TRACE_LEVEL macro, because this macro needs to be set before including any trace header files. They include:

Public Constructors

RWTraceLevelFilter(RWStaticCtor);
RWTraceLevelFilter(RWTraceEventSeverity level = RW_TRACE_LEVEL_NONE);
RWTraceLevelFilter(RWTraceLevelFilterImp* bodyP);
RWTraceLevelFilter(const RWTraceLevelFilter& second);

Public Destructor

~RWTraceLevelFilter();

Public Member Functions

RWTraceEventSeverity 
getLevel() const;
void 
setLevel(const RWTraceEventSeverity level);


Previous fileTop of DocumentContentsIndex pageNext file

© 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.