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 | 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. |
virtual void addMapping(const MString & rsRole, MSink & rSink) throw(MException);