combo_logger Class Reference

combines a file_logger with a console logger (see console_logger.h). More...

#include <file_logger.h>

Inheritance diagram for combo_logger:

Inheritance graph
[legend]
Collaboration diagram for combo_logger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 combo_logger (const istring &filename, int limit=LOG_FILE_SIZE, bool standard_error=false)
virtual ~combo_logger ()
virtual outcome log (const istring &info, int filter=ALWAYS_PRINT)
 writes information to the log file (if the filename is valid).
virtual void add_filter (int new_filter)
 Adds a member to the filter set.
virtual void remove_filter (int old_filter)
 Removes a member from the filter set.
virtual void clear_filters ()
 Resets the filter set to be empty.
virtual void eol (line_ending to_set)
 modifies how line endings are to be printed.

Detailed Description

combines a file_logger with a console logger (see console_logger.h).

this will output both to the file and to the console.

Definition at line 149 of file file_logger.h.


Constructor & Destructor Documentation

combo_logger::combo_logger ( const istring filename,
int  limit = LOG_FILE_SIZE,
bool  standard_error = false 
)

Definition at line 376 of file file_logger.cpp.

combo_logger::~combo_logger (  )  [virtual]

Definition at line 383 of file file_logger.cpp.

References WHACK().


Member Function Documentation

outcome combo_logger::log ( const istring info,
int  filter = ALWAYS_PRINT 
) [virtual]

writes information to the log file (if the filename is valid).

the "filter" value is checked to see if it is in the current set of allowed filters. a value of zero is always printed. if the filename() has not been set, then the information is lost.

Reimplemented from file_logger.

Definition at line 409 of file file_logger.cpp.

References file_logger::log(), and console_logger::log().

void combo_logger::add_filter ( int  new_filter  )  [virtual]

Adds a member to the filter set.

The filter set is used to check all extended filter values passed to log and print. if the special filters of ALWAYS_PRINT or NEVER_PRINT are added, then either everything will be logged or nothing will be.

Reimplemented from log_base.

Definition at line 385 of file file_logger.cpp.

References log_base::add_filter().

void combo_logger::remove_filter ( int  old_filter  )  [virtual]

Removes a member from the filter set.

Reimplemented from log_base.

Definition at line 391 of file file_logger.cpp.

References log_base::remove_filter().

void combo_logger::clear_filters (  )  [virtual]

Resets the filter set to be empty.

Reimplemented from log_base.

Definition at line 397 of file file_logger.cpp.

References log_base::clear_filters().

void combo_logger::eol ( line_ending  to_set  )  [virtual]

modifies how line endings are to be printed.

Reimplemented from log_base.

Definition at line 403 of file file_logger.cpp.

References log_base::eol().


The documentation for this class was generated from the following files:
Generated on Thu Aug 28 04:34:52 2008 for HOOPLE Libraries by  doxygen 1.5.1