aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/debug/Log.hpp
blob: 98d176afba392b9718ea7a115029f2b884a64ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <string>
#include <wlr/util/log.h>

#define LOGMESSAGESIZE 1024

enum LogLevel
{
    NONE = -1,
    LOG  = 0,
    WARN,
    ERR,
    CRIT,
    INFO
};

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;
};