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-05 01:56:17 +00:00
|
|
|
Direction get_direction(int x, int y);
|
|
|
|
Direction string_to_direction(std::string s);
|
|
|
|
GestureMode string_to_gesturemode(std::string s);
|
|
|
|
Action string_to_action(std::string s);
|
|
|
|
LogLevel string_to_loglevel(std::string s);
|
|
|
|
}
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
#endif //LOGID_UTIL_H
|