Page 1 of 1

Display std::cout in console window

Posted: 28 Mar 2012, 01:28
by scrawl
What do you think? IMO it would make debugging easier, as I don't have to switch between OpenMW and the terminal window / IDE all the time to see the output.

edit: with std::cout this wouldn't be possible (correct me if i'm wrong), but we can use a log macro that writes the message to standard output as well as the console.

Re: Display std::cout in console window

Posted: 28 Mar 2012, 01:29
by jhooks1
Good idea, sort of like how aedra works.

Re: Display std::cout in console window

Posted: 28 Mar 2012, 08:01
by Chris
Proper logging would be nice, with various severity levels. Would Ogre's logging methods work? Could they be hooked so messages can be mirrored on the console and std::cout given their severity?

Re: Display std::cout in console window

Posted: 28 Mar 2012, 08:06
by psi29a
Might I recommend a framework for logging?
Log4cxx is pretty damn good and we use it here for our product at work. Based around log4j but for c++ so it works wonders. It has various logging levels and is configurable.

http://logging.apache.org/log4cxx/

Re: Display std::cout in console window

Posted: 28 Mar 2012, 09:03
by Zini
We should probably avoid additional dependencies. OGRE has a logging framework and I think boost has one too. If someone really want to have a go at it, go ahead. Echoing to the ingame console should be made optional though.