Hyprland/src/debug/Log.hpp

25 lines
525 B
C++
Raw Normal View History

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
enum LogLevel
{
2022-03-16 20:50:55 +01:00
NONE = -1,
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 {
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);
inline std::string logFile;
inline int64_t* disableLogs = nullptr;
inline int64_t* disableTime = nullptr;
2022-03-16 20:50:55 +01:00
};