Controlling the log

Jochen Katz katz____telematik.informatik.uni-karlsruhe.de
Wed Jun 21 13:56:15 CEST 2000


Hi,

> It seems from the agent++ code that it would be possible to get a lot more
> log messages out on the screen than available by default. How can I set the
> different logging levels when needed?

you can use Log::set_filter(int logclass, unsigned char filter) to do
this:

#ifndef _NO_LOGGING
  DefaultLog::log->set_filter(ERROR_LOG, 10);
  DefaultLog::log->set_filter(WARNING_LOG, 11);
  DefaultLog::log->set_filter(EVENT_LOG, 12);
  DefaultLog::log->set_filter(INFO_LOG, 13);
  DefaultLog::log->set_filter(DEBUG_LOG, 14);
#endif

Best regards,
  Jochen



More information about the AGENTPP mailing list