certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] CERTI deadlock


From: Eric Noulard
Subject: Re: [certi-dev] CERTI deadlock
Date: Fri, 15 Jun 2012 15:27:59 +0200

2012/6/15 Michael Raab <address@hidden>:
> I think it may help to forward all RTIA output messages to a certain log
> file. I tried the following:
>
> // redirect std::out and std::cerr to file
>
> // get process id
> DWORD pid = GetCurrentProcessId();
> stringstream outfilename;
> outfilename << "d:\\rtia_" << pid << ".log";
>
> ofstream logfile;
> logfile.open (outfilename.str().c_str());
>
> cout.rdbuf(logfile.rdbuf());
> cerr.rdbuf(logfile.rdbuf());
>
> But unfortunately nothing seems to be dropped to this file.
> May be its because the PrettyDebug code has the following static var:
> std::ostream PrettyDebug::_defaultOutputStream(std::cerr.rdbuf());
> Is it somehow already possible to redirect the output?

We usually do redirection in the console :-(
I'll try something more usable from a programmatic point of view,
but I may not be able to do it until next monday.

What you can do on your side temporarily is to patch the
PrettyDebug constructor in order to put in the ostream corresponding
to your wanted file.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]