library/src/log.h

31 lines
540 B
C
Raw Normal View History

2019-11-05 15:08:17 +01:00
#ifndef LIBRARY_LOG_H
#define LIBRARY_LOG_H
#include <string>
enum LogLevel{
DEBUG = 1,
INFO = 2,
WARNING = 3,
ERROR = 4,
CRITICAL = 5,
OFF = 6
};
2019-11-05 15:19:51 +01:00
/**
* log the messgae with logLevel and timestamp
* @author Julian Hinxlage
* @since 0.1.0
*/
2019-11-05 15:08:17 +01:00
void log(const std::string &msg, LogLevel level = LogLevel::INFO);
2019-11-05 15:19:51 +01:00
/**
* set the logLevel, the log function will use this to determine if the message is logged
* @author Julian Hinxlage
* @since 0.1.0
*/
2019-11-05 15:08:17 +01:00
void setLogLevel(LogLevel level);
#endif //LIBRARY_LOG_H