This works for me:
#include <iostream>
#include <fstream>
static std::ofstream g_log("c:\\Message.log");
extern "C" int WINAPI _tWinMain(HINSTANCE /*hInstance*/, HINSTANCE
/*hPrevInstance*/, LPTSTR /*lpCmdLine*/, int nShowCmd)
{
std::cout.rdbuf(g_log.rdbuf());
std::cerr.rdbuf(g_log.rdbuf());
...
...
}
There's a version that outputs to the debug window in visual studio on
the osg website and in the mail achieves if that's your preference.
2009/5/11 Vincent Bourdier <[email protected]>:
> Hi,
>
> Using the std stream, you can redirect the out stream into a file stream.
> I don't know if osg implements a thing about that, i think it don't...
>
> Regards,
> Vincent
>
> 2009/5/11 forest <[email protected]>
>>
>> hi all
>> osg::notify put notifies on the console defaultly.Can I put these
>> notifies to a file?
>> thanks in advance.
>> best regardes
>> forest
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
--
http://www.ssTk.co.uk
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org