library/src/log.h

31 lines
540 B
C++

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