navi homeaboutscreenshotsdownloaddevelopmentforum



The OutputHandler acts like std::ostream (by overloading the << operator for all standard types and manipulators) and redirects output to three different streams: The logfile, the executing console and the ingame-shell.

Every stream has it's own maximal debug-level. Output only gets passed to a stream, if the level of the output is ⇐ the configured level of the stream. To set the level of the output, use setOutputLevel(level). After that, every following output will have this level.

Usually the COUT(level) macro handles this. The debug level config values define the levels of each stream. Read the related wiki-pages for more information. OutputHandler receives the configured output levels as soon as CoreSettings gets created. The OutputBuffer of the Shell will be added as soon as the Shell gets created. OutputHandler uses a fallback OutputBuffer until then.


  • setOutputLevel(level): Sets the level of the following output.
  • operator<<(output): Redirects an output to every stream (if the output-level fulfills the requirements).


The illustration shows how output chunks of different levels are passed to OutputHandler. There they are distributed to the three output devices and filtered by the configured maximal output levels. At the end, gray chunks are displayed in the device while red chunks are discarded.

Last modified 6 years ago Last modified on Aug 22, 2011, 2:07:59 PM

Attachments (1)

Download all attachments as: .zip