Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PG_LogConsole Namespace Reference


Detailed Description

logging functions.

These functions can be used for any purpose logging


Functions

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


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:
id the log level of the message
Text the message text *printf format string)
ap the variable list

void PG_LogConsole::SetConsoleKey SDLKey  key  ) 
 

Set the key to toggle the console (default F12).

Parameters:
key the key to toggle the console The key will be used by PG_Application to toggle the log console.
Examples:
dblbuffer.cpp.

void PG_LogConsole::SetLogLevel PG_LOG_LEVEL  newlevel  ) 
 

Set the minimum log level.

Parameters:
newlevel the 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:
max maximum amount of log lines.

void PG_LogConsole::SetMethod int  method  ) 
 

Set the log method.

Parameters:
method determines 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:
title the title of the window
alignment the alingment of the title

void PG_LogConsole::Show  ) 
 

Show the log window.

Examples:
paratest.cpp.

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.

Examples:
paratest.cpp.


The ParaGUI Project - Alexander Pipelka