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 () |
bool | dump () const |
| Is this logger allowed to dump data files directly to the filestore?.
|
const vcl_string & | dump_prefix () const |
| A filepath prefix that this logger should use when creating dump files.
|
const vcl_string & | timestamp () const |
| Time stamp format. Don't save timestamp if empty. Not Yet Implemented.
|
Static Public Member Functions |
static mbl_logger_root & | root () |
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_base * | output_ |
mbl_log_streambuf | streambuf_ |
vcl_ostream | logstream_ |
vcl_ostream * | mt_logstream_ |
vcl_string | dump_prefix_ |
| File location to dump files.
|
vcl_string | timestamp_ |
| Time stamp format.
|
Friends |
class | mbl_log_streambuf |
class | mbl_logger_root |
Detailed Description
Main user logging class - represents a category.
Definition at line 191 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 258 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 153 of file mbl_log.cxx.
mbl_logger::mbl_logger |
( |
const mbl_logger & |
| ) |
[private] |
mbl_logger::mbl_logger |
( |
const char * |
id | ) |
|
mbl_logger::~mbl_logger |
( |
| ) |
|
Member Function Documentation
bool mbl_logger::dump |
( |
| ) |
const [inline] |
Is this logger allowed to dump data files directly to the filestore?.
Definition at line 240 of file mbl_log.h.
const vcl_string& mbl_logger::dump_prefix |
( |
| ) |
const [inline] |
A filepath prefix that this logger should use when creating dump files.
Normal behaviour is to treat this as a prefix rather than a dir, so "./my_dump_area/foo_" indicates the program should create files that begin with "foo_" in sub-directory my_dump_area of the cwd.
Definition at line 246 of file mbl_log.h.
int mbl_logger::level |
( |
| ) |
const [inline] |
Higher means more output.
Definition at line 231 of file mbl_log.h.
vcl_ostream & mbl_logger::log |
( |
int |
level, |
|
|
const char * |
srcfile = "" , |
|
|
int |
srcline = 0 |
|
) |
| |
vcl_ostream& mbl_logger::mtlog |
( |
| ) |
[inline] |
A log with manual event start and stop requirements.
Definition at line 235 of file mbl_log.h.
void mbl_logger::mtstart |
( |
int |
level, |
|
|
const char * |
srcfile = "" , |
|
|
int |
srcline = 0 |
|
) |
| |
void mbl_logger::mtstop |
( |
| ) |
|
void mbl_logger::reinitialise |
( |
| ) |
[private] |
Update settings in light of changes to the root / configuration.
Definition at line 346 of file mbl_log.cxx.
logger will take ownership of output.
Definition at line 369 of file mbl_log.cxx.
const vcl_string& mbl_logger::timestamp |
( |
| ) |
const [inline] |
Time stamp format. Don't save timestamp if empty. Not Yet Implemented.
Definition at line 249 of file mbl_log.h.
Friends And Related Function Documentation
Member Data Documentation
File location to dump files.
If empty - don't dump files.
Definition at line 212 of file mbl_log.h.
Time stamp format.
If empty - don't print time stamp.
Definition at line 215 of file mbl_log.h.
The documentation for this class was generated from the following files: