Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

fixed links

HowTo: Output

First you have to include Output.h:

#include "util/Output.h"

Then you can use the orxout() function instead of std::cout (note: printf is obsolete). orxout() works almost like std::cout, but you can assign a level to your output:

orxout(user_info) << "This is some cool output!" << endl;

Every output through orxout() will be sent to the console, the logfile and the in-game-shell. There is a configurable maximal output level for every device. If the level of your output is > the maximal level of a device, it wont be displayed. But don't use orxout(debug_output) all the time because the user SHOULD be able to deactivate your output unless it's REALLY important.

See doc/Output for more information about levels, contexts, and the general usage of orxout().