ParaGUI  1.1.9
Functions
PG_LogConsole Namespace Reference

logging functions. More...

Functions

void LogVA (PG_LOG_LEVEL id, const char *Text, va_list ap)
 Log a message. More...
 
void Done ()
 Clears the list of log messages and removes the log window. More...
 
void Update ()
 Updates the log window. More...
 
void SetLogLevel (PG_LOG_LEVEL newlevel)
 Set the minimum log level. More...
 
void Show ()
 Show the log window. More...
 
void Hide ()
 Hide the log window. More...
 
void Toggle ()
 Toggle between log window shown/hidden. More...
 
void SetMethod (int method)
 Set the log method. More...
 
int GetMethod ()
 Get the log method. More...
 
void SetConsoleKey (SDLKey key)
 Set the key to toggle the console (default F12) More...
 
SDLKey GetConsoleKey ()
 Get the current key to toggle console. More...
 
void SetTitle (const char *title, PG_Label::TextAlign alignment=PG_Label::CENTER)
 Set the title of the log console window. More...
 
void SetMaxLogLines (Uint32 max)
 Set a limit for the amount of log lines (200 lines by default). More...
 

Detailed Description

logging functions.

These functions can be used for any purpose logging

Function Documentation

void PG_LogConsole::Done ( )

Clears the list of log messages and removes the log window.

SDLKey PG_LogConsole::GetConsoleKey ( )

Get the current key to toggle console.

Returns
current key to toggle the console
int PG_LogConsole::GetMethod ( )

Get the log method.

Returns
current log method
void PG_LogConsole::Hide ( )

Hide the log window.

void PG_LogConsole::LogVA ( PG_LOG_LEVEL  id,
const char *  Text,
va_list  ap 
)

Log a message.

Don't use this function directly, it is unconvenient and meant for internal use only. Use The PG_Log functions instead if you want to log something.

Parameters
idthe log level of the message
Textthe message text *printf format string)
apthe variable list
void PG_LogConsole::SetConsoleKey ( SDLKey  key)

Set the key to toggle the console (default F12)

Parameters
keythe key to toggle the console The key will be used by PG_Application to toggle the log console.
void PG_LogConsole::SetLogLevel ( PG_LOG_LEVEL  newlevel)

Set the minimum log level.

Parameters
newlevelthe new minimum log level All log messages with a log level smaller than newlevel will be quietly discarded.
void PG_LogConsole::SetMaxLogLines ( Uint32  max)

Set a limit for the amount of log lines (200 lines by default).

Parameters
maxmaximum amount of log lines.
void PG_LogConsole::SetMethod ( int  method)

Set the log method.

Parameters
methoddetermines where to log messages to
void PG_LogConsole::SetTitle ( const char *  title,
PG_Label::TextAlign  alignment = PG_Label::CENTER 
)

Set the title of the log console window.

Parameters
titlethe title of the window
alignmentthe alingment of the title
void PG_LogConsole::Show ( )

Show the log window.

void PG_LogConsole::Toggle ( )

Toggle between log window shown/hidden.

void PG_LogConsole::Update ( )

Updates the log window.

This function creates a log window if it doesn't exist and writes all log messages to this window.