Cinder  0.9.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::log::LoggerFileRotating Class Reference

#include <Log.h>

Inherits cinder::log::LoggerFile.

Public Member Functions

 LoggerFileRotating (const fs::path &folder, const std::string &formatStr, bool appendToExisting=true)
 
virtual ~LoggerFileRotating ()
 
void write (const Metadata &meta, const std::string &text) override
 
const fs::path & getFilePath () const
 
void setTimestampEnabled (bool enable=true)
 
bool isTimestampEnabled () const
 

Protected Member Functions

fs::path getDefaultLogFilePath () const
 
void ensureDirectoryExists ()
 
void writeDefault (std::ostream &stream, const Metadata &meta, const std::string &text)
 

Protected Attributes

fs::path mFolderPath
 
std::string mDailyFormatStr
 
int mYearDay
 
fs::path mFilePath
 
bool mAppend
 
std::ofstream mStream
 

Detailed Description

LoggerFileRotating will write log messages to a file that is rotated at midnight.

Constructor & Destructor Documentation

cinder::log::LoggerFileRotating::LoggerFileRotating ( const fs::path &  folder,
const std::string &  formatStr,
bool  appendToExisting = true 
)

Creates a rotating log file that will rotate when the first logging event occurs after midnight. formatStr will be passed to strftime to determine the file name.

virtual cinder::log::LoggerFileRotating::~LoggerFileRotating ( )
virtual

Member Function Documentation

void cinder::log::LoggerFileRotating::write ( const Metadata meta,
const std::string &  text 
)
overridevirtual

Reimplemented from cinder::log::LoggerFile.

const fs::path& cinder::log::LoggerFile::getFilePath ( ) const
inherited

Returns the file path targeted by this logger.

fs::path cinder::log::LoggerFile::getDefaultLogFilePath ( ) const
protectedinherited
void cinder::log::LoggerFile::ensureDirectoryExists ( )
protectedinherited
void cinder::log::Logger::setTimestampEnabled ( bool  enable = true)
inherited
bool cinder::log::Logger::isTimestampEnabled ( ) const
inherited
void cinder::log::Logger::writeDefault ( std::ostream &  stream,
const Metadata meta,
const std::string &  text 
)
protectedinherited

Member Data Documentation

fs::path cinder::log::LoggerFileRotating::mFolderPath
protected
std::string cinder::log::LoggerFileRotating::mDailyFormatStr
protected
int cinder::log::LoggerFileRotating::mYearDay
protected
fs::path cinder::log::LoggerFile::mFilePath
protectedinherited
bool cinder::log::LoggerFile::mAppend
protectedinherited
std::ofstream cinder::log::LoggerFile::mStream
protectedinherited

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