navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by landauf, 3 years ago) (diff)

fixed links

This is an archived page!
This page is very old and the content is not up to date.
Not everything (if any) which is written here will be in the final game!



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.

Attachments (1)

Download all attachments as: .zip