Changes between Version 1 and Version 2 of Logging
- Timestamp:
- Apr 15, 2013, 8:24:44 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Logging
v1 v2 3 3 = Engine = 4 4 5 The engine is written in C++. Prefer these functions for logging and outputting text:5 The [wiki:Coding_Conventions#Errorreporting coding conventions] have some information regarding logging in the engine. 6 6 7 * `debug_printf(const wchar_t* format, ...)` 7 The engine is written in C++. Prefer the following functions for logging and outputting text: 8 8 9 * `LOGMESSAGE(const wchar_t* format, ...)` 9 10 * `LOGMESSAGERENDER(const wchar_t* format, ...)` 11 12 Use these functions to report possible misconfigurations or errors that can be caused by modding: 13 10 14 * `LOGWARNING(const wchar_t* format, ...)` 11 15 * `LOGERROR(const wchar_t* format, ...)` 12 16 17 Use `debug_printf` to indicate engine bugs, as this breaks into a debugger. 18 19 * `debug_printf(const wchar_t* format, ...)` 20 13 21 ||= '''Function''' =||= '''Game console''' =||= '''Rendered message''' =||= '''Main log''' =||= '''Interesting log''' =||= '''std::out'''* =||= '''std::err''' =|| 14 ||`debug_printf` || N || N || N || N || Y || N ||15 22 ||`LOGMESSAGE` || N || N || Y || N || N || N || 16 23 ||`LOGMESSAGERENDER` || Y || Y - green text || Y || N || N || N || 17 24 ||`LOGWARNING` || Y || Y - yellow text || Y || Y || Y || N || 18 25 ||`LOGERROR` || Y || Y - red text || Y || Y || Y || N || 26 ||`debug_printf` || N || N || N || N || Y || N || 19 27 `*` On Windows, the game writes debug output instead of std::out. Run the game in a debugger or use [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] to view it.[[BR]] 20 28