CppCMS
|
log file based sink - sends messages to log file More...
#include <booster/booster/log.h>
Public Member Functions | |
file () | |
void | open (std::string file_name) |
void | max_files (unsigned limit) |
void | append () |
void | set_timezone (std::string const &name) |
virtual void | log (message const &) |
Send message to the log. |
log file based sink - sends messages to log file
Creates new object but does not open a file
void booster::log::sinks::file::append | ( | ) |
Append to output file rather then create new one.
void booster::log::sinks::file::max_files | ( | unsigned | limit | ) |
Enable file rotation and set the maximal number of files that should be kept.
Each time the log opened, the old files are renamed, if there are more files then limit, the oldest is removed
void booster::log::sinks::file::open | ( | std::string | file_name | ) |
Open log file
void booster::log::sinks::file::set_timezone | ( | std::string const & | name | ) |
Set the time-zone name that should be used in the message.
It should have a format GMT+XX:YY like "GMT+2:00" or "GMT-3". "GMT" can be used as well
If name is empty local time is used which is the default