Hi all,

I have a non console based application that has it's own reporting
mechanism built-in. I'd like to be able to set the NotifyLevel and
have these messages sent to my logger tool. My logger tool also has
it's own filters/log-levels, so I'd like to be able to map the
osg::NotifySeverity to some matching log-level.

I've figured out a way to reoute all osg::notify messages to my
logger, but I can't seem to find a way to get the osg::NotifySeverity
mapping. Any thoughts on how this could be done is greatly
appretiated.

What I have done to just flush all osg::notify messages to my logger is:

void main()
{
  MyLoggWrapper log;
  std::streambuf* notifyBuf = osg::notify().rdbuf();
  osg::notify().rdbuf(log.rdbuf());
  osg::notify(osg::INFO) << "This message is passed straight to my
logger, sadly without knowlede of NotifySeverity" << std::endl;
  <snip>
  //osgViewer instantiation and main loop etc.
  </snip>
  osg::notify().rdbuf(notifyBuf);
}


Filip Holm
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to