Changes between Version 6 and Version 7 of Logging


Ignore:
Timestamp:
Feb 8, 2023, 1:17:46 AM (15 months ago)
Author:
Langbart
Comment:

Add "warn(uneval([]))" example, streamline footnotes.

Legend:

Unmodified
Added
Removed
Modified
  • Logging

    v6 v7  
    1616 * `debug_printf(const char* format, ...)`
    1717
    18 ||= '''Function''' =||= '''Game console''' =||= '''Rendered message''' =||= '''Main log''' =||= '''Interesting log''' =||= '''stdout'''* =||= '''stderr''' =||
     18||= '''Function''' =||= '''Game console''' =||= '''Rendered message''' =||= '''Main log''' =||= '''Interesting log''' =||= '''stdout'''^[#footnote1 (1)]^ =||= '''stderr''' =||
    1919||`LOGMESSAGE` ||  N  ||  N  ||  Y  ||  N  ||  N  ||  N  ||
    2020||`LOGMESSAGERENDER` ||  Y  ||  Y - green text  ||  Y  ||  N  ||  N  ||  N  ||
     
    2222||`LOGERROR` ||  Y  ||  Y - red text  ||  Y  ||  Y  ||  Y  ||  N  ||
    2323||`debug_printf` ||  N  ||  N  ||  N  ||  N  ||  Y  ||  N  ||
    24  `*` On Windows, the game writes debug output instead of stdout. Run the game in a debugger or use [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] to view it.[[BR]]
    2524
    2625'''Note:''' to use the `LOG*` functions, you must include [source:/ps/trunk/source/ps/CLogger.h ps/CLogger.h].[[BR]]
     
    3635 * `error(message)`
    3736
    38 ||= '''Function''' =||= '''Game console''' =||= '''Rendered message''' =||= '''Main log''' =||= '''Interesting log''' =||= '''stdout'''* =||= '''stderr''' =||
     37||= '''Function''' =||= '''Game console''' =||= '''Rendered message''' =||= '''Main log''' =||= '''Interesting log''' =||= '''stdout'''^[#footnote1 (1)]^ =||= '''stderr''' =||
    3938||`print` ||  N  ||  N  ||  N  ||  N  ||  Y  ||  N  ||
    4039||`console.write` ||  Y  ||  N  ||  N  ||  N  ||  N  ||  N  ||
     
    4241||`warn` ||  Y  ||  Y - yellow text  ||  Y  ||  Y  ||  Y  ||  N  ||
    4342||`error` ||  Y  ||  Y - red text  ||  Y  ||  Y  ||  Y  ||  N  ||
    44  `*` On Windows, the game writes debug output instead of stdout. Run the game in a debugger or use [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] to view it.[[BR]]
     43 
     44
     45{{{#!sh
     46# Print a debug message with several arguments.
     47warn(uneval(['string', arg1, arg2]))
     48}}}
    4549
    4650= Atlas UI =
     
    5357 * `wxLogError(const char* formatString, ...)`
    5458
     59----
     60
     61[=#footnote1 ^(1)^] On Windows, the game writes debug output instead of stdout. Run the game in a debugger or use [http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx DebugView] to view it.[[BR]]