2022-03-16 20:50:55 +01:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2022-08-22 18:50:38 +02:00
|
|
|
#include <wlr/util/log.h>
|
2022-03-16 20:50:55 +01:00
|
|
|
|
|
|
|
#define LOGMESSAGESIZE 1024
|
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
enum LogLevel
|
|
|
|
{
|
2022-03-16 20:50:55 +01:00
|
|
|
NONE = -1,
|
2022-12-16 18:17:31 +01:00
|
|
|
LOG = 0,
|
2022-03-16 20:50:55 +01:00
|
|
|
WARN,
|
|
|
|
ERR,
|
2022-06-25 20:50:29 +02:00
|
|
|
CRIT,
|
|
|
|
INFO
|
2022-03-16 20:50:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace Debug {
|
2022-12-16 18:17:31 +01:00
|
|
|
void init(const std::string& IS);
|
|
|
|
void log(LogLevel level, const char* fmt, ...);
|
|
|
|
void wlrLog(wlr_log_importance level, const char* fmt, va_list args);
|
2022-06-03 17:41:57 +02:00
|
|
|
|
|
|
|
inline std::string logFile;
|
2022-12-16 18:17:31 +01:00
|
|
|
inline int64_t* disableLogs = nullptr;
|
|
|
|
inline int64_t* disableTime = nullptr;
|
2022-03-16 20:50:55 +01:00
|
|
|
};
|