Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes

vl::Log Class Reference

Utility class to generate logs. More...

#include <Log.hpp>

Inheritance diagram for vl::Log:
vl::Object vl::StandardLog

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 Log ()

Static Public Member Functions

static void setLogger (Log *logger)
 Installs a new logger.
static Loglogger ()
 Returns the currently installed logger.
static void force_print (const String &message)
 Logs the specified string regardless of the current verbosity level.
static void print (const String &message)
static void info (const String &message)
 The string "info: " is prepended to the message.
static void debug (const String &message)
 The string "debug: " is prepended to the message.
static void warning (const String &message)
 The string "warning: " is prepended to the message.
static void error (const String &message)
 The string "error: " is prepended to the message.
static void bug (const String &message)
 The string "bug: " is prepended to the message.

Protected Types

enum  ELogLevel {
  LogBug, LogError, LogWarning, LogNormal,
  LogInfo, LogDebug
}

Protected Member Functions

virtual void printImplementation (ELogLevel level, const String &message)=0

Static Protected Member Functions

static void print (ELogLevel level, const String &message)

Static Protected Attributes

static ref< LogmLogger

Detailed Description

Utility class to generate logs.


Member Enumeration Documentation

enum vl::Log::ELogLevel [protected]
Enumerator:
LogBug 
LogError 
LogWarning 
LogNormal 
LogInfo 
LogDebug 

Constructor & Destructor Documentation

vl::Log::Log (  ) [inline]

Member Function Documentation

virtual const char* vl::Log::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::StandardLog.

virtual void vl::Log::printImplementation ( ELogLevel  level,
const String message 
) [protected, pure virtual]

Implemented in vl::StandardLog.

static void vl::Log::setLogger ( Log logger ) [inline, static]

Installs a new logger.

Set this to NULL to disable logging.

static Log* vl::Log::logger (  ) [inline, static]

Returns the currently installed logger.

void Log::force_print ( const String message ) [static]

Logs the specified string regardless of the current verbosity level.

void Log::print ( const String message ) [static]
void Log::info ( const String message ) [static]

The string "info: " is prepended to the message.

Use this function to provide extra information useful to the end user.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_NORMAL
void Log::debug ( const String message ) [static]

The string "debug: " is prepended to the message.

Use this function to provide information information useful to the programmer.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_DEBUG
void Log::warning ( const String message ) [static]

The string "warning: " is prepended to the message.

Use this function to provide information about situations that might lead to errors or loss of data.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_ERROR
void Log::error ( const String message ) [static]

The string "error: " is prepended to the message.

Use this function to provide information about a run-time error: file not found, out of memory etc.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_ERROR
void Log::bug ( const String message ) [static]

The string "bug: " is prepended to the message.

Use this function to provide information about a critical programming error: wrong parameter initialization, division by zero, imminent crash etc.

Note:
Log generated only if verbosity level >= vl::VEL_VERBOSITY_ERROR
void Log::print ( ELogLevel  level,
const String message 
) [static, protected]

Member Data Documentation

ref< Log > Log::mLogger [static, protected]

The documentation for this class was generated from the following files:

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:47.
Permission is granted to use this page to write and publish articles regarding Visualization Library.