Belle II Software light-2406-ragdoll
|
Implements a log connection to a text file. More...
#include <LogConnectionTxtFile.h>
Public Member Functions | |
LogConnectionTxtFile (const std::string &filename, bool append=false) | |
The constructor. | |
virtual | ~LogConnectionTxtFile () |
The LogConnectionTxtFile destructor. | |
bool | sendMessage (const LogMessage &message) override |
Sends a log message. | |
bool | isConnected () override |
Returns true if the connection to the text file could be established. | |
void | finalizeOnAbort () override |
Make sure the file is closed on abort. | |
Private Attributes | |
std::ofstream | m_fileStream |
The file output stream used for sending the log message. | |
Implements a log connection to a text file.
Inherits from the abstract base class LogConnectionBase.
Definition at line 27 of file LogConnectionTxtFile.h.
|
explicit |
The constructor.
filename | The path and name of the text file. |
append | If this value is set to true, an existing file will not be overridden, but instead the log messages will be added to the end of the file. |
Definition at line 15 of file LogConnectionTxtFile.cc.
|
overridevirtual |
Make sure the file is closed on abort.
Reimplemented from LogConnectionBase.
Definition at line 35 of file LogConnectionTxtFile.cc.
|
overridevirtual |
Returns true if the connection to the text file could be established.
Implements LogConnectionBase.
Definition at line 22 of file LogConnectionTxtFile.cc.
|
overridevirtual |
Sends a log message.
message | The log message object. |
Implements LogConnectionBase.
Definition at line 27 of file LogConnectionTxtFile.cc.
|
private |
The file output stream used for sending the log message.
Definition at line 62 of file LogConnectionTxtFile.h.