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.
Display std::cout in console window
Display std::cout in console window
Last edited by scrawl on 28 Mar 2012, 01:31, edited 1 time in total.
Re: Display std::cout in console window
Good idea, sort of like how aedra works.
Re: Display std::cout in console window
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?
- psi29a
- Posts: 5361
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Display std::cout in console window
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/
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
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.