![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <file_output.h>
Public Member Functions | |
| NamedOutput (size_t ringBufferSize=65536) | |
| virtual void | open (const std::string &filename, const std::string &compression="", int level=-1) |
| void | rotate (const std::string &newFilename, const std::string &newCompression="", int newLevel=-1) |
| virtual void | close () |
Public Attributes | |
| boost::function< void(std::string)> | onPreFileOpen |
| boost::function< void(std::string)> | onPostFileOpen |
| boost::function< void(std::string)> | onPreFileClose |
| boost::function< void(std::string)> | onPostFileClose |
Protected Member Functions | |
| virtual std::shared_ptr< Sink > | createSink (const std::string &filename, bool append)=0 |
| void | switchFile (const std::string &filename, const std::string &compression, int level) |
| void | closeFile () |
Class that logs messages into a file, optionally gzipped or otherwise compressed.
The file writing is provided in another thread to avoid the entire logger getting bogged down if a disk can't keep up.
Definition at line 31 of file file_output.h.
| void Datacratic::NamedOutput::close | ( | ) | [virtual] |
Should close whatever resources are being used by the output and join any threads that it's created.
Implements Datacratic::LogOutput.
Definition at line 83 of file file_output.cc.
| void Datacratic::NamedOutput::rotate | ( | const std::string & | newFilename, |
| const std::string & | newCompression = "", |
||
| int | newLevel = -1 |
||
| ) |
Rotate the log file, finishing off writing the old one and then moving everything into the new one.
This is an asynchronous operation. It will return straight away.
Definition at line 69 of file file_output.cc.
1.7.6.1