Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | 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.


Function Documentation

void Done  ) 
 

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

SDLKey GetConsoleKey  ) 
 

Get the current key to toggle console.

Returns:
current key to toggle the console

int GetMethod  ) 
 

Get the log method.

Returns:
current log method

void Hide  ) 
 

Hide the log window.

void 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 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 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 SetMethod int  method  ) 
 

Set the log method.

Parameters:
method determines where to log messages to

void 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 Show  ) 
 

Show the log window.

void Toggle  ) 
 

Toggle between log window shown/hidden.

void Update  ) 
 

Updates the log window.

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



The ParaGUI Project - Alexander Pipelka