logger Class Reference

#include <log.hpp>

Inheritance diagram for logger:

Inheritance graph
[legend]
Collaboration diagram for logger:

Collaboration graph
[legend]

List of all members.


Detailed Description

Global logger that sends log lines to the various log targets.

The global logger object will be created on the first call to global_logger(), and will destroy itself when the last log target goes out of scope.

Definition at line 66 of file log.hpp.


Public Types

enum  {
  LOG_LEVEL_NONE = 0, LOG_LEVEL_BASIC = 1, LOG_LEVEL_MEDIUM = 5, LOG_LEVEL_HIGH = 10,
  LOG_LEVEL_ULTRA = 100
}

Public Member Functions

void print_line (int log_level, const gsgl::string &)
void register_resource (R *)
void unregister_resource (R *)

Static Public Member Functions

static loggerglobal_instance ()
 Reimplemented to enable auto-creation.
static void set_global_log_level (int new_log_level)

Protected Attributes

registered_resources

Private Member Functions

 logger ()
virtual ~logger ()

Static Private Attributes

static int global_log_level = logger::LOG_LEVEL_BASIC

Member Enumeration Documentation

anonymous enum

Enumerator:
LOG_LEVEL_NONE 
LOG_LEVEL_BASIC 
LOG_LEVEL_MEDIUM 
LOG_LEVEL_HIGH 
LOG_LEVEL_ULTRA 

Definition at line 75 of file log.hpp.


Constructor & Destructor Documentation

logger (  )  [private]

Definition at line 59 of file log.cpp.

References ft_stream::out.

Referenced by logger::global_instance().

~logger (  )  [private, virtual]

Definition at line 72 of file log.cpp.

References ft_stream::out.


Member Function Documentation

logger * global_instance (  )  [static]

Reimplemented to enable auto-creation.

Reimplemented from global_register.

Definition at line 101 of file log.cpp.

References logger::logger().

Referenced by gsgl::log(), log_target::log_target(), and log_target::~log_target().

void print_line ( int  log_level,
const gsgl::string msg 
)

Definition at line 85 of file log.cpp.

References logger::global_log_level, and global_register::registered_resources.

Referenced by gsgl::log().

void register_resource ( R *  r  )  [inline, inherited]

void set_global_log_level ( int  new_log_level  )  [static]

Definition at line 95 of file log.cpp.

References logger::global_log_level.

void unregister_resource ( R *  r  )  [inline, inherited]


Member Data Documentation

int global_log_level = logger::LOG_LEVEL_BASIC [static, private]

Definition at line 69 of file log.hpp.

Referenced by logger::print_line(), and logger::set_global_log_level().

L registered_resources [protected, inherited]


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

Generated on Sat Mar 1 13:50:05 2008 for Periapsis Project by  doxygen 1.5.5