micetools/src/micetools/dll/util/log.h

33 lines
989 B
C
Raw Normal View History

2022-07-02 15:07:54 +00:00
#pragma once
2022-06-13 03:22:52 +00:00
#include <Windows.h>
#include <stdio.h>
2022-07-02 15:07:54 +00:00
#define LOG_MISC FALSE
#define LOG_INFO TRUE
#define LOG_WARNING TRUE
#define LOG_ERROR TRUE
#define LOG_GAME TRUE
2022-07-02 15:07:54 +00:00
// #define LOG_TO_FILE
2022-06-13 03:22:52 +00:00
#define COMM_LOGGER "comm"
2022-06-13 03:22:52 +00:00
#define HOOKS_LOGGER "hooks"
#define BOOT_LOGGER "boot"
extern CRITICAL_SECTION logger_lock;
int log_misc(const char* caller, const char* format, ...);
int log_info(const char* caller, const char* format, ...);
int log_warning(const char* caller, const char* format, ...);
int log_error(const char* caller, const char* format, ...);
2022-07-02 15:07:54 +00:00
int log_game(const char* caller, const char* format, ...);
2022-06-13 03:22:52 +00:00
int vlog_misc(const char* caller, const char* format, va_list args);
int vlog_info(const char* caller, const char* format, va_list args);
int vlog_warning(const char* caller, const char* format, va_list args);
int vlog_error(const char* caller, const char* format, va_list args);
2022-07-02 15:07:54 +00:00
int vlog_game(const char* caller, const char* format, va_list args);
2022-06-13 03:22:52 +00:00
void setup_logging();