2019-10-05 01:56:17 +00:00
|
|
|
#ifndef LOGID_UTIL_H
|
|
|
|
#define LOGID_UTIL_H
|
2019-07-17 05:53:51 +00:00
|
|
|
|
|
|
|
#include "Actions.h"
|
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
namespace logid
|
2019-07-17 05:53:51 +00:00
|
|
|
{
|
2019-10-05 01:56:17 +00:00
|
|
|
enum LogLevel
|
|
|
|
{
|
|
|
|
DEBUG,
|
|
|
|
INFO,
|
|
|
|
WARN,
|
|
|
|
ERROR
|
|
|
|
};
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
extern LogLevel global_verbosity;
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
void log_printf(LogLevel level, const char* format, ...);
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
const char* level_prefix(LogLevel level);
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-06 01:27:17 +00:00
|
|
|
Direction getDirection(int x, int y);
|
|
|
|
Direction stringToDirection(std::string s);
|
|
|
|
GestureMode stringToGestureMode(std::string s);
|
|
|
|
Action stringToAction(std::string s);
|
|
|
|
LogLevel stringToLogLevel(std::string s);
|
2019-10-05 01:56:17 +00:00
|
|
|
}
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
#endif //LOGID_UTIL_H
|