#include <ace/Log_Msg.h>
class ACE_Log_Msg_Callback {
public:
virtual ~ACE_Log_Msg_Callback (void);
virtual void log (ACE_Log_Record &log_record) = 0;
};
Your log() routine is called with an instance of ACE_Log_Record. From this class, you can get the log message, the verbose log message, message type, message priority, and so on.
Remember that there is one Log_Msg object per thread. Therefore, you may need to register your callback object with many Log_Msg objects (and have the correct synchronization in the log() method) or have a separate callback object per Log_Msg object.
virtual ~ACE_Log_Msg_Callback (void);
virtual void log (ACE_Log_Record &log_record) = 0;