Classes | |
| class | GlobalLogger |
| Class for the Logger. More... | |
Enumerations | |
| enum class | LogLevel { none = 0 , error = 1 , warning = 2 , trace = 3 } |
| Currently supported log levels for the logging feature. More... | |
Functions | |
| void | initLogging (LogLevel log_level, const std::string &log_file_path="") |
| Initalizes the logging feature. More... | |
| void | flush () |
| Flushes the log. More... | |
| std::ostream & | printError (const source_location location=source_location::current()) |
| Writes an error message to the log. More... | |
| std::ostream & | printWarning (const source_location location=source_location::current()) |
| Writes a warning message to the log. More... | |
| std::ostream & | printTrace (const source_location location=source_location::current()) |
| Writes a trace message to the log. More... | |
| std::ostream & | printLog (LogLevel log_level, const source_location location) |
| Prints a log message to the log. More... | |
| std::string | logLevelToString (LogLevel log_level) |
| Converts the enum LogLevel into string. More... | |
| std::string | stripSourceFileName (const std::string &file_name) |
| Gets the source file name out of the path. More... | |
|
strong |
| void helper::logging::flush | ( | ) |
Flushes the log.
| void helper::logging::initLogging | ( | LogLevel | log_level, |
| const std::string & | log_file_path = "" |
||
| ) |
Initalizes the logging feature.
| [in] | log_level | The max log level that will be written to the log. |
| [in] | log_file_path | The file path to the log file. If it is empty cout is used. |
| std::string helper::logging::logLevelToString | ( | LogLevel | log_level | ) |
Converts the enum LogLevel into string.
| [in] | log_level | LogLevel enum that will be converted. |
| std::ostream & helper::logging::printError | ( | const source_location | location = source_location::current() | ) |
Writes an error message to the log.
| [in] | location | The source code location. Using the default value gives the current source code location. |
| std::ostream & helper::logging::printLog | ( | LogLevel | log_level, |
| const source_location | location | ||
| ) |
Prints a log message to the log.
| [in] | log_level | The log level of the message to be written. |
| [in] | location | The source code location. Using the default value gives the current source code location. |
| std::ostream & helper::logging::printTrace | ( | const source_location | location = source_location::current() | ) |
Writes a trace message to the log.
| [in] | location | The source code location. Using the default value gives the current source code location. |
| std::ostream & helper::logging::printWarning | ( | const source_location | location = source_location::current() | ) |
Writes a warning message to the log.
| [in] | location | The source code location. Using the default value gives the current source code location. |
| std::string helper::logging::stripSourceFileName | ( | const std::string & | file_name | ) |
Gets the source file name out of the path.
| [in] | file_name | Source file name with the complete path. |