TPIE

2362a60
tpie::file_log_target Class Reference

A simple logger that writes messages to a tpie temporary file. More...

#include <tpie/tpie_log.h>

Inherits tpie::log_target.

Public Member Functions

 file_log_target (log_level threshold)
 Construct a new file logger. More...
 
void log (log_level level, const char *message, size_t)
 Implement log_target virtual method to record message. More...
 
void begin_group (const std::string &name)
 Creates a new logging group. More...
 
void end_group ()
 Closes the most recently created logging group. More...
 

Public Attributes

std::ofstream m_out
 
std::string m_path
 
log_level m_threshold
 

Detailed Description

A simple logger that writes messages to a tpie temporary file.

Definition at line 37 of file tpie_log.h.

Constructor & Destructor Documentation

tpie::file_log_target::file_log_target ( log_level  threshold)

Construct a new file logger.

Parameters
thresholdrecord messages at or above this severity threshold

Member Function Documentation

void tpie::file_log_target::begin_group ( const std::string &  name)
virtual

Creates a new logging group.

All console output that occurs after this will appear in the same visual group.

Reimplemented from tpie::log_target.

void tpie::file_log_target::end_group ( )
virtual

Closes the most recently created logging group.

Reimplemented from tpie::log_target.

void tpie::file_log_target::log ( log_level  level,
const char *  message,
size_t   
)
virtual

Implement log_target virtual method to record message.

Parameters
levelseverity of message
messagecontent of message

Implements tpie::log_target.


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