forked from Splitx12/MrMeow-dev-release-based-SOT-Hook-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logger.h
28 lines (22 loc) · 706 Bytes
/
logger.h
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
26
27
28
#pragma once
#include <windows.h>
#include <iostream>
#include <string>
#include <stdio.h>
#define va_buffer(ap,parmN,buffer) { va_list ap; va_start(ap, parmN); vsnprintf(buffer, sizeof(buffer), parmN, ap); va_end(ap); }
#define PRINT_DEBUG_LOGS 1
namespace tslog
{
enum class level { VERBOSE, LOG, INFO, WARNINGS, ERRORS, CRITICAL, DEBUG, OFF };
static FILE* file = NULL;
static level logLevel;
static bool bShowConsole;
bool init(level loglevel, bool showConsole);
bool shutdown();
void debug(const char* text, ...);
void critical(const char* text, ...);
void info(const char* text, ...);
void log(const char* text, ...);
void verbose(const char* text, ...);
bool setLevel(int level);
}