#include <senf/Utils/Logger/FileTarget.hh>
The FileTarget will save all log messages in the given file. Messages will be appended at the end of the file.
senf::log::FileTarget target ("file.name"); // Route all messages to this file. target.route();
After log files have been rotated, the reopen() member should be called to create a new log file.
Definition at line 61 of file FileTarget.hh.
Classes |
|
struct | RegisterConsole |
Public Member Functions |
|
void | reopen () |
Reopen log after log-file rotation. |
|
void | reopen (std::string const &file) |
Reopen log under a new name. |
|
std::string const & | filename () const |
Return current log file name. |
|
Structors and default members |
|
FileTarget (std::string const &filename, std::string const &nodename="") | |
Construct FileTarget writing to file. |
senf::log::FileTarget:: | ||||
FileTarget | ( | std::string const & | filename, | |
std::string const & |
nodename = ""
|
) | ||
Construct FileTarget writing to file.
Definition at line 50 of file FileTarget.cc.
std::string const & senf::log::FileTarget:: | ||||
filename | () | |||
Return current log file name.
Definition at line 90 of file FileTarget.cc.
void senf::log::FileTarget:: | ||||
reopen | ( | std::string const & | file | ) |
Reopen log under a new name.
Definition at line 80 of file FileTarget.cc.
void senf::log::FileTarget:: | ||||
reopen | () | |||
Reopen log after log-file rotation.
Definition at line 74 of file FileTarget.cc.