Thanks Maciej, thanks for the changes they look to be a good step
forward for osg::notify.  Now merged and checked into svn/trunk.

On Tue, May 12, 2009 at 9:39 AM, Maciej Krol <[email protected]> wrote:
> Hi Robert,
>
> With advent of GUI applications in OSG there is a growing need to redirect
> notification messages to third party systems. For example windows
> applications do not have console output, it would be appropriate to redirect
> notifications to GUI widget or debug output. I have revamped notification
> system to fit this need. New notification stream is using NotifyHandler as a
> message sink. Handler is called whenever stream is synchronized (i.e. after
> <<std::endl). Standard streams std::cout and std::cerr are no longer used
> although by default StandardNotifyHandler is a message sink. Custom
> notification handler can be set with osg::setNotifyHandler(NotifyHandler *)
> function.
>
> Two implementations of NotifyHandler are currently available:
> - StandardNotifyHandler, calls fputs(message, stderr) for severity <= WARN
> and fputs(message, stdout) for severity > WARN
> - WinDebugNotifyHandler, windows users can redirect notifications to windows
> debug output, notifications can be viewed in output window of the debugger
> i.e. MSVC or DebugView
> (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) (see
> screenshot).
>
> I have seen on osg-users that some people do
> std::cerr.rdbuf(otherStream.rdbuf()) to redirect notifications. This trick
> will no longer work since osg::notify() returns internal osg::NotifyStream
> not std::cout or std::cerr. You can use
> osg::notify().rdbuf(otherStream.rdbuf()) to do this instead.
>
> Additionally I've made some minor fixes:
> - Minor imrovements to osg::notify documentation
> - NullStream could crash by deleting stream buffer other than default
> NullStreamBuffer in the destructor i.e. after
> osg::notify(osg::DEBUG_FP).rdbuf(otherStream.rdbuf())
>
> Regards,
> Maciej Krol
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to