2020-05-08 14:45:27 +00:00
|
|
|
/**
|
|
|
|
* Fancy console log output format
|
|
|
|
* todo log level support
|
|
|
|
*
|
|
|
|
* @author Lukas Heiligenbrunner
|
|
|
|
* @date 26.10.2019
|
|
|
|
*/
|
2019-10-26 12:41:43 +00:00
|
|
|
|
2019-08-01 19:19:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-08-02 20:44:42 +00:00
|
|
|
#include <string>
|
2019-10-26 12:41:43 +00:00
|
|
|
|
2019-08-01 19:19:02 +00:00
|
|
|
class Logger {
|
|
|
|
public:
|
2020-05-01 13:33:20 +00:00
|
|
|
/**
|
|
|
|
* a debug message
|
|
|
|
* @param message message
|
|
|
|
*/
|
2019-10-26 12:41:43 +00:00
|
|
|
static void debug(std::string message);
|
2020-05-01 13:33:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* a default message
|
|
|
|
* @param message message
|
|
|
|
*/
|
2019-10-26 12:41:43 +00:00
|
|
|
static void message(std::string message);
|
2020-05-01 13:33:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* a warning message
|
|
|
|
* @param message message
|
|
|
|
*/
|
2019-10-26 12:41:43 +00:00
|
|
|
static void warning(std::string message);
|
2020-05-01 13:33:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* a error message
|
|
|
|
* @param message message
|
|
|
|
*/
|
2019-10-26 12:41:43 +00:00
|
|
|
static void error(std::string message);
|
2019-08-01 19:19:02 +00:00
|
|
|
|
2020-05-01 13:33:20 +00:00
|
|
|
/**
|
|
|
|
* a log message with manual level set
|
|
|
|
* @param message message
|
|
|
|
* @param level loglevel (1-4) or predefined labels
|
|
|
|
*/
|
2020-04-30 10:16:29 +00:00
|
|
|
static void log(const std::string &message, int level);
|
2019-08-01 19:19:02 +00:00
|
|
|
|
2020-05-01 13:33:20 +00:00
|
|
|
|
2020-04-30 17:37:11 +00:00
|
|
|
static const int Debug = 4;
|
|
|
|
static const int Message = 3;
|
|
|
|
static const int Warning = 2;
|
|
|
|
static const int Error = 1;
|
2019-08-01 19:19:02 +00:00
|
|
|
};
|