Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
mbl_logger Class Reference

Main user logging class - represents a category. More...

#include <mbl_log.h>

List of all members.

Public Types

enum  levels {
  NONE = -100, EMERG = 0, ALERT = 100, CRIT = 200,
  ERR = 300, WARN = 400, NOTICE = 500, INFO = 600,
  DEBUG = 700, ALL = 800
}
 Log priority levels. More...

Public Member Functions

 mbl_logger (const char *id)
 ~mbl_logger ()
void set (int level, mbl_log_output_base *output)
 logger will take ownership of output.
int level () const
 Higher means more output.
vcl_ostream & log (int level, const char *srcfile="", int srcline=0)
vcl_ostream & mtlog ()
 A log with manual event start and stop requirements.
void mtstart (int level, const char *srcfile="", int srcline=0)
void mtstop ()

Static Public Member Functions

static mbl_logger_rootroot ()

Private Member Functions

 mbl_logger ()
 Default constructor only available to root's default logger.
 mbl_logger (const mbl_logger &)
void reinitialise ()
 Update settings in light of changes to the root / configuration.

Private Attributes

int level_
mbl_log_output_baseoutput_
mbl_log_streambuf streambuf_
vcl_ostream logstream_
vcl_ostream * mt_logstream_

Friends

class mbl_log_streambuf
class mbl_logger_root

Detailed Description

Main user logging class - represents a category.

Definition at line 171 of file mbl_log.h.


Member Enumeration Documentation

Log priority levels.

Based on POSIX syslog API. Default level is NOTICE.

Enumerator:
NONE 
EMERG 
ALERT 
CRIT 
ERR 
WARN 
NOTICE 
INFO 
DEBUG 
ALL 

Definition at line 217 of file mbl_log.h.


Constructor & Destructor Documentation

mbl_logger::mbl_logger ( ) [private]

Default constructor only available to root's default logger.

Definition at line 131 of file mbl_log.cxx.

mbl_logger::mbl_logger ( const mbl_logger ) [private]
mbl_logger::mbl_logger ( const char *  id)

Definition at line 282 of file mbl_log.cxx.

mbl_logger::~mbl_logger ( )

Definition at line 144 of file mbl_log.cxx.


Member Function Documentation

int mbl_logger::level ( ) const [inline]

Higher means more output.

Definition at line 203 of file mbl_log.h.

vcl_ostream & mbl_logger::log ( int  level,
const char *  srcfile = "",
int  srcline = 0 
)

Definition at line 337 of file mbl_log.cxx.

vcl_ostream& mbl_logger::mtlog ( ) [inline]

A log with manual event start and stop requirements.

Definition at line 207 of file mbl_log.h.

void mbl_logger::mtstart ( int  level,
const char *  srcfile = "",
int  srcline = 0 
)

Definition at line 345 of file mbl_log.cxx.

void mbl_logger::mtstop ( )

Definition at line 356 of file mbl_log.cxx.

void mbl_logger::reinitialise ( ) [private]

Update settings in light of changes to the root / configuration.

Definition at line 307 of file mbl_log.cxx.

mbl_logger_root & mbl_logger::root ( ) [static]

Definition at line 364 of file mbl_log.cxx.

void mbl_logger::set ( int  level,
mbl_log_output_base output 
)

logger will take ownership of output.

Definition at line 329 of file mbl_log.cxx.


Friends And Related Function Documentation

friend class mbl_log_streambuf [friend]

Definition at line 222 of file mbl_log.h.

friend class mbl_logger_root [friend]

Definition at line 223 of file mbl_log.h.


Member Data Documentation

int mbl_logger::level_ [private]

Definition at line 182 of file mbl_log.h.

vcl_ostream mbl_logger::logstream_ [private]

Definition at line 185 of file mbl_log.h.

vcl_ostream* mbl_logger::mt_logstream_ [private]

Definition at line 186 of file mbl_log.h.

Definition at line 183 of file mbl_log.h.

Definition at line 184 of file mbl_log.h.


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