Pol  Revision:cb584c9
Pol::Clib::Logging::LogSinkGenericFile Class Reference

#include <logfacility.h>

+ Inheritance diagram for Pol::Clib::Logging::LogSinkGenericFile:

Public Member Functions

 LogSinkGenericFile (const LogFileBehaviour *behaviour)
 
 LogSinkGenericFile ()
 
virtual ~LogSinkGenericFile ()
 
virtual void addMessage (fmt::Writer *msg) POL_OVERRIDE
 
virtual void addMessage (fmt::Writer *msg, const std::string &id) POL_OVERRIDE
 
void open_log_file (bool open_timestamp)
 
void setBehaviour (const LogFileBehaviour *behaviour, std::string filename)
 
- Public Member Functions inherited from Pol::Clib::Logging::LogSink
 LogSink ()
 
virtual ~LogSink ()
 

Protected Member Functions

bool test_for_rollover (std::chrono::time_point< std::chrono::system_clock > &now)
 

Protected Attributes

bool _active_line
 
const LogFileBehaviour_behaviour
 
std::ofstream _filestream
 
std::chrono::time_point< std::chrono::system_clock > _lasttimestamp
 
std::string _log_filename
 
struct tm _opened
 

Additional Inherited Members

- Static Public Member Functions inherited from Pol::Clib::Logging::LogSink
static void addTimeStamp (std::ostream &stream)
 
static std::string getTimeStamp ()
 

Detailed Description

Definition at line 33 of file logfacility.h.

Constructor & Destructor Documentation

Pol::Clib::Logging::LogSinkGenericFile::LogSinkGenericFile ( const LogFileBehaviour behaviour)

Definition at line 257 of file logfacility.cpp.

References _opened, and open_log_file().

Pol::Clib::Logging::LogSinkGenericFile::LogSinkGenericFile ( )

Definition at line 267 of file logfacility.cpp.

References _opened.

Pol::Clib::Logging::LogSinkGenericFile::~LogSinkGenericFile ( )
virtual

Definition at line 272 of file logfacility.cpp.

References _filestream.

Member Function Documentation

void Pol::Clib::Logging::LogSinkGenericFile::addMessage ( fmt::Writer *  msg,
const std::string &  id 
)
virtual

Implements Pol::Clib::Logging::LogSink.

Reimplemented in Pol::Clib::Logging::LogSink_debuglog.

Definition at line 334 of file logfacility.cpp.

References addMessage().

void Pol::Clib::Logging::LogSinkGenericFile::setBehaviour ( const LogFileBehaviour behaviour,
std::string  filename 
)

Definition at line 281 of file logfacility.cpp.

References _behaviour, and _log_filename.

bool Pol::Clib::Logging::LogSinkGenericFile::test_for_rollover ( std::chrono::time_point< std::chrono::system_clock > &  now)
protected

Member Data Documentation

bool Pol::Clib::Logging::LogSinkGenericFile::_active_line
protected

Definition at line 51 of file logfacility.h.

Referenced by addMessage(), and open_log_file().

const LogFileBehaviour* Pol::Clib::Logging::LogSinkGenericFile::_behaviour
protected
std::ofstream Pol::Clib::Logging::LogSinkGenericFile::_filestream
protected
std::chrono::time_point<std::chrono::system_clock> Pol::Clib::Logging::LogSinkGenericFile::_lasttimestamp
protected

Definition at line 50 of file logfacility.h.

Referenced by addMessage().

std::string Pol::Clib::Logging::LogSinkGenericFile::_log_filename
protected
struct tm Pol::Clib::Logging::LogSinkGenericFile::_opened
protected

Definition at line 49 of file logfacility.h.

Referenced by LogSinkGenericFile(), open_log_file(), and test_for_rollover().


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