Main   Class List   Namespace List   Online

Logging
[Console]

Functions for logging messages, warnings, and errors to the console. More...

Classes

class  ConsoleLogger

Enumerations

enum  LogLevel {
  normal,
  warning,
  error
}
 

Priority levels for logging entries.

More...

Functions

void dumpConsoleClasses (bool dumpScript=true, bool dumpEngine=true)
 Dumps all declared console classes to the console.
void dumpConsoleFunctions (bool dumpScript=true, bool dumpEngine=true)
 Dumps all declared console functions to the console.
void echo (string message...)
 Logs a message to the console.
void error (string message...)
 Logs an error message to the console.
void log (string message)
 Logs a message to the console.
void logError (string message)
 Logs an error message to the console.
void logWarning (string message)
 Logs a warning message to the console.
void setLogMode (int mode)
 Determines how log files are written.
void warn (string message...)
 Logs a warning message to the console.

Detailed Description

Functions for logging messages, warnings, and errors to the console.


Enumeration Type Documentation

enum LogLevel

Priority levels for logging entries.

Enumerator:
normal 

Lowest priority level, no highlighting.

warning 

Mid level priority, tags and highlights possible issues in blue.

error 

Highest priority level, extreme emphasis on this entry. Highlighted in red.


Function Documentation

void dumpConsoleClasses ( bool  dumpScript = true,
bool  dumpEngine = true 
)

Dumps all declared console classes to the console.

Parameters:
dumpScript Optional parameter specifying whether or not classes defined in script should be dumped.
dumpEngine Optional parameter specifying whether or not classes defined in the engine should be dumped.
void dumpConsoleFunctions ( bool  dumpScript = true,
bool  dumpEngine = true 
)

Dumps all declared console functions to the console.

Parameters:
dumpScript Optional parameter specifying whether or not functions defined in script should be dumped.
dumpEngine Optional parameter specitying whether or not functions defined in the engine should be dumped.
void echo ( string  message...  ) 

Logs a message to the console.

Concatenates all given arguments to a single string and prints the string to the console. A newline is added automatically after the text.

Parameters:
message Any number of string arguments.
void error ( string  message...  ) 

Logs an error message to the console.

Concatenates all given arguments to a single string and prints the string to the console as an error message (in the in-game console, these will show up using a red font by default). A newline is added automatically after the text.

Parameters:
message Any number of string arguments.
void log ( string  message  ) 

Logs a message to the console.

Parameters:
message The message text.
Note:
By default, messages will appear white in the console.
void logError ( string  message  ) 

Logs an error message to the console.

Parameters:
message The message text.
Note:
By default, errors will appear red in the console.
void logWarning ( string  message  ) 

Logs a warning message to the console.

Parameters:
message The message text.
Note:
By default, warnings will appear turquoise in the console.
void setLogMode ( int  mode  ) 

Determines how log files are written.

Sets the operational mode of the console logging system.

Parameters:
mode Parameter specifying the logging mode. This can be:

  • 1: Open and close the console log file for each seperate string of output. This will ensure that all parts get written out to disk and that no parts remain in intermediate buffers even if the process crashes.
  • 2: Keep the log file open and write to it continuously. This will make the system operate faster but if the process crashes, parts of the output may not have been written to disk yet and will be missing from the log.

Additionally, when changing the log mode and thus opening a new log file, either of the two mode values may be combined by binary OR with 0x4 to cause the logging system to flush all console log messages that had already been issued to the console system into the newly created log file.

Note:
Xbox 360 does not support logging to a file. Use Platform::OutputDebugStr in C++ instead.
void warn ( string  message...  ) 

Logs a warning message to the console.

Concatenates all given arguments to a single string and prints the string to the console as a warning message (in the in-game console, these will show up using a turquoise font by default). A newline is added automatically after the text.

Parameters:
message Any number of string arguments.


Copyright © GarageGames, LLC. All Rights Reserved.