Server Meshing
Loading...
Searching...
No Matches
Logger.hpp File Reference
#include "pch.h"
Include dependency graph for Logger.hpp:
This graph shows which files directly or indirectly include this file:

Macros

#define RED   12
#define PURPLE   13
#define YELLOW   14
#define WHITE   15
#define __FILE_STEM__   file_stem(__FILE__)
#define NLOG(level, color, msg, verbose, ...)
#define LOG_INFO(msg, ...)
#define LOG_FAIL(msg, ...)
#define LOG_ERROR(msg, ...)

Functions

const char * file_stem (const char *path)

Variables

HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE)

Macro Definition Documentation

◆ __FILE_STEM__

#define __FILE_STEM__   file_stem(__FILE__)

◆ LOG_ERROR

#define LOG_ERROR ( msg,
... )
Value:
NLOG("ERROR", RED, msg, true, __VA_ARGS__)
#define NLOG(level, color, msg, verbose,...)
Definition Logger.hpp:21
#define RED
Definition Logger.hpp:4

◆ LOG_FAIL

#define LOG_FAIL ( msg,
... )
Value:
NLOG("FAIL", PURPLE, msg, true, __VA_ARGS__)
#define PURPLE
Definition Logger.hpp:5

◆ LOG_INFO

#define LOG_INFO ( msg,
... )
Value:
NLOG("INFO", WHITE, msg, false , __VA_ARGS__)
#define WHITE
Definition Logger.hpp:7

◆ NLOG

#define NLOG ( level,
color,
msg,
verbose,
... )
Value:
do { \
SetConsoleTextAttribute(hConsole, (color)); \
if ((verbose)) { \
printf("[%s] [File: %s] | Line: %d :: ", (level), __FILE_STEM__, __LINE__); \
} else { \
printf("[%s] ", (level)); \
} \
printf((msg) , __VA_ARGS__); \
printf("\n"); \
SetConsoleTextAttribute(hConsole, WHITE); \
} while(0)
HANDLE hConsole
Definition Logger.hpp:9
#define __FILE_STEM__
Definition Logger.hpp:19

◆ PURPLE

#define PURPLE   13

◆ RED

#define RED   12

◆ WHITE

#define WHITE   15

◆ YELLOW

#define YELLOW   14

Function Documentation

◆ file_stem()

const char * file_stem ( const char * path)
inline

Variable Documentation

◆ hConsole

HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE)
inline