TIBCO Adapter SDK C++ Reference
Up | Next
MTrace::addMapping
MTrace
Map this role to the specified sink.
Remarks
This method must be called before using the MTrace::debug() or MTrace::trace()methods.

If you want trace messages of all roles to arrive at the sink, call addMapping() multiple times--once for each role. You can send different types of messages to different sinks or to the same sink.

Even if you add the same sink several times, the trace messages are logged only once.

The SDK provides four predefined roles, but you are free to use any role name you like.

Parameters
Parameters Description
const MString & rsRole Role for this mapping, one of MAPP_INFO_ROLE, MAPP_DEBUG_ROLE, MAPP_WARNING_ROLE, MAPP_ERROR_ROLE.
MSink & rSink Sink to which the tracing information will go when the MTrace::debug() or MTrace::trace() method is called with the role specified for the sink.
Declaration
virtual void addMapping(const MString & rsRole, MSink & rSink) throw(MException);
Links
Copyright (c) 2010 TIBCO Software Inc. All rights reserved.