Outputs log messages to a named file. More...
#include <mbl_log.h>

Public Member Functions | |
| mbl_log_output_file (const vcl_string &filename, const char *id) | |
| virtual void | start_with_manual_termination (int level, const char *srcfile, int srcline) |
| Start a new log entry, with id info. | |
| virtual void | start_with_flush_termination (int level, const char *srcfile, int srcline) |
| Start a new log entry, with id info. | |
| virtual void | append (const char *contents, vcl_streamsize n_chars) |
| Add contents to the existing log entry. | |
| virtual void | terminate_manual () |
| Finish the log entry, sent from a stream flush. | |
| virtual void | terminate_flush () |
| Finish the log entry, sent from explicit function call, e.g. by MBL_LOG. | |
| virtual const char * | id () |
| Which logger id are we using. | |
Private Member Functions | |
| void | start () |
| Start a new log entry, with id info. | |
Private Attributes | |
| vcl_ofstream | file_ |
| The file where logging finally gets sent. | |
| const char * | id_ |
| logger identity. | |
| bool | has_started_ |
| true if a log entry is in progress. | |
| bool | ignore_flush_ |
| Ignore calls to terminate_flush. | |
| mbl_log_output_file::mbl_log_output_file | ( | const vcl_string & | filename, |
| const char * | id | ||
| ) |
Definition at line 237 of file mbl_log.cxx.
| void mbl_log_output_file::append | ( | const char * | contents, |
| vcl_streamsize | n_chars | ||
| ) | [virtual] |
Add contents to the existing log entry.
add contents to the existing log entry.
Implements mbl_log_output_base.
Definition at line 273 of file mbl_log.cxx.
| virtual const char* mbl_log_output_file::id | ( | ) | [inline, virtual] |
Which logger id are we using.
Implements mbl_log_output_base.
| void mbl_log_output_file::start | ( | ) | [private] |
Start a new log entry, with id info.
Definition at line 242 of file mbl_log.cxx.
| void mbl_log_output_file::start_with_flush_termination | ( | int | level, |
| const char * | srcfile, | ||
| int | srcline | ||
| ) | [virtual] |
Start a new log entry, with id info.
Future calls to terminate_flush will be honoured.
Implements mbl_log_output_base.
Definition at line 265 of file mbl_log.cxx.
| void mbl_log_output_file::start_with_manual_termination | ( | int | level, |
| const char * | srcfile, | ||
| int | srcline | ||
| ) | [virtual] |
Start a new log entry, with id info.
Future calls to terminate_flush will be ignored.
Implements mbl_log_output_base.
Definition at line 256 of file mbl_log.cxx.
| void mbl_log_output_file::terminate_flush | ( | ) | [virtual] |
Finish the log entry, sent from explicit function call, e.g. by MBL_LOG.
Implements mbl_log_output_base.
Definition at line 294 of file mbl_log.cxx.
| void mbl_log_output_file::terminate_manual | ( | ) | [virtual] |
Finish the log entry, sent from a stream flush.
Implements mbl_log_output_base.
Definition at line 287 of file mbl_log.cxx.
vcl_ofstream mbl_log_output_file::file_ [private] |
bool mbl_log_output_file::has_started_ [private] |
const char* mbl_log_output_file::id_ [private] |
bool mbl_log_output_file::ignore_flush_ [private] |
1.7.5.1