Modern, functional logger class.
More...
#include <logging.hpp>
|
|
| ~Logger () |
| | The log text is finalized, and if necessary, write operations to a file or to stdout are performed.
|
| |
|
| Logger (const Logger &)=delete |
| |
|
| Logger (const LogLevels level, std::string function, std::string logFile, std::string name, std::string file, int line) |
| |
|
template<typename T > |
| Logger & | operator<< (const T &msg) |
| | To use the << operator for receiving non-function-like inputs.
|
| |
|
Logger & | operator<< (std::ostream &(*msg)(std::ostream &)) |
| | To use the << operator for receiving function-like inputs.
|
| |
|
Logger & | operator= (const Logger &)=delete |
| |
|
template<typename... Args> |
| Logger & | write (std::format_string< Args... > fmt, Args &&...args) |
| | Function for modern std::print style logging.
|
| |
Modern, functional logger class.
- Note
- It is recommended to use ready-made macros to benefit from this class.
- See also
- Helper::Logger::Properties
◆ moveOldLogs()
Transfers the contents of the old log file to the new one.
- Parameters
-
| oldLogFile | Old log file. |
| newLogFile | New log file. |
| remove | Will the old log file be deleted? |
- Returns
- Returns true if successful. Otherwise, false.
- Note
- This function is called automatically when the log file path is changed.
The documentation for this class was generated from the following file: