6 #include <experimental/source_location> 
    7 using std::experimental::source_location;
 
   10 #include <experimental/source_location> 
   11 using std::experimental::source_location;
 
   13 #include <source_location> 
   14 using std::source_location;
 
   18 #define FATAL_INTERNAL_ERROR_MSG(MSG)                                                                                                                          \ 
   20         const source_location location = source_location::current();                                                                                           \ 
   21         std::cout << "FATAL INTERNAL ERROR in <" << location.function_name() << "> at <" << location.line() << ">\n";                                          \
 
   65 std::ostream& 
printError(
const source_location location = source_location::current());
 
   73 std::ostream& 
printWarning(
const source_location location = source_location::current());
 
   81 std::ostream& 
printTrace(
const source_location location = source_location::current());
 
void initLogging(LogLevel log_level, const std::string &log_file_path="")
Initalizes the logging feature.
Definition: logging.cpp:83
 
std::ostream & printTrace(const source_location location=source_location::current())
Writes a trace message to the log.
Definition: logging.cpp:102
 
std::ostream & printError(const source_location location=source_location::current())
Writes an error message to the log.
Definition: logging.cpp:92
 
std::string stripSourceFileName(const std::string &file_name)
Gets the source file name out of the path.
Definition: logging.cpp:123
 
LogLevel
Currently supported log levels for the logging feature.
Definition: logging.h:35
 
@ trace
Adds "Trace" before the log message.
 
@ none
No log level is selected.
 
@ warning
Adds "Warning" before the log message.
 
@ error
Adds "Error" before the log message.
 
std::string logLevelToString(LogLevel log_level)
Converts the enum LogLevel into string.
Definition: logging.cpp:107
 
void flush()
Flushes the log.
Definition: logging.cpp:145
 
std::ostream & printWarning(const source_location location=source_location::current())
Writes a warning message to the log.
Definition: logging.cpp:97
 
std::ostream & printLog(LogLevel log_level, const source_location location)
Prints a log message to the log.
Definition: logging.cpp:134