log file and osgEarth messages...

classic Classic list List threaded Threaded
5 messages Options
2LR 2LR
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

log file and osgEarth messages...

Does osgEarth have the ability to dump its messages to a log or text file?

For example, rather than having a message like "[osgEarth]* [TileSource] Open failed: Failed to open dataset Z:\TerrainDataDT1\terrain.tif" that prints to the console, it could be redirected to a file instead.

If osgEarth has this capability, how do I enable it?

Thanks,
Shayne
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: log file and osgEarth messages...

Shayne,
No, it always writes to std::cout (or std::cerr). The osgEarth/Notify code is mostly just copied from an old version of osg/Notify. I think the latest osg/Notify stuff lets you set a custom handler. You could port that over the osgEarth without much difficulty, probably. -gw
Glenn Waldron / Pelican Mapping
2LR 2LR
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: log file and osgEarth messages...

Thanks Glenn. I will take a look at the OSG notify stuff. If it suits my purposes, I will port it over...
remoe remoe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: log file and osgEarth messages...

In reply to this post by gwaldron
Glenn, i don't see a way to add a custom handler with current code. What you mean with "port that over"? Redirect cout and cerr is not very smart.
Remo Eichenberger, Switzerland, @crocomer
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: log file and osgEarth messages...

I mean that the OSG Notify framework has support for custom handlers (osg::setNotifyHandler function). So  it is possible to adapt that approach for use in osgEarth.
Glenn Waldron / Pelican Mapping
Loading...