helib::Logger Class Reference
Logger class that handles warning printouts. More...
#include <log.h>
Public Member Functions | |
void | setLogToStderr () |
Set the logger object to write to stderr . More... | |
void | setLogToFile (const std::string &filepath, bool overwrite=false) |
Set the logger object to write to specified file. More... | |
Logger ()=default | |
Default constructor creates a logger object that does not point to any target/destination. More... | |
Logger (const Logger &other)=default | |
Copy constructor, creates a copy of a logger object. More... | |
Logger (Logger &&other)=default | |
Move constructor, can be used with std::move but does the same as the copy constructor. More... | |
Logger & | operator= (Logger &other)=default |
Copy assignment operator, copies a logger object. More... | |
Logger & | operator= (Logger &&other)=default |
Move assignment operator, does the same as the copy assignment operator. More... | |
~Logger () | |
Destructor that closes and deletes the log stream object if required i.e. if the log stream is a file. More... | |
Friends | |
void | Warning (const char *msg) |
Function for logging a warning message. More... | |
Detailed Description
Logger class that handles warning printouts.
Constructor & Destructor Documentation
◆ Logger() [1/3]
|
default |
Default constructor creates a logger object that does not point to any target/destination.
◆ Logger() [2/3]
|
default |
Copy constructor, creates a copy of a logger object.
◆ Logger() [3/3]
|
default |
Move constructor, can be used with std::move
but does the same as the copy constructor.
◆ ~Logger()
helib::Logger::~Logger | ( | ) |
Destructor that closes and deletes the log stream object if required i.e. if the log stream is a file.
Member Function Documentation
◆ operator=() [1/2]
Move assignment operator, does the same as the copy assignment operator.
◆ operator=() [2/2]
Copy assignment operator, copies a logger object.
◆ setLogToFile()
void helib::Logger::setLogToFile | ( | const std::string & | filepath, |
bool | overwrite = false |
||
) |
Set the logger object to write to specified file.
- Parameters
-
filepath The name of the file to write to. overwrite Flag to tell the logger to overwrite the file.
- Note
- Appends to file by default.
◆ setLogToStderr()
void helib::Logger::setLogToStderr | ( | ) |
Set the logger object to write to stderr
.
Friends And Related Function Documentation
◆ Warning
|
friend |
Function for logging a warning message.
- Parameters
-
msg The warning message.