|
- #ifndef IZ_LOG_H
- #define IZ_LOG_H
-
- #ifdef _WIN64
-
- #define RED ""
- #define GRN ""
- #define YEL ""
- #define BLU ""
- #define MAG ""
- #define CYN ""
- #define WHT ""
- #define RESET ""
-
- #else
-
- #define RED "\x1B[31m"
- #define GRN "\x1B[32m"
- #define YEL "\x1B[33m"
- #define BLU "\x1B[34m"
- #define MAG "\x1B[35m"
- #define CYN "\x1B[36m"
- #define WHT "\x1B[37m"
- #define RESET "\x1B[0m"
-
- #endif
-
- #define IZ_LOG_LEVEL_FLAG_DEBUG
- #define IZ_LOG_LEVEL_FLAG_INFO
- #define IZ_LOG_LEVEL_FLAG_WARN
- #define IZ_LOG_LEVEL_FLAG_ERROR
-
- //#define IZ_LOG_DATE_FUNCTION IZ_TimerElapsed
- #define IZ_LOG_DATE_FUNCTION IZ_TimerNow
-
- #include <stdbool.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <time.h>
- #include "../timer/IZ_timer.h"
-
- typedef enum {
- IZ_LOG_CATEGORY_INPUT,
- IZ_LOG_CATEGORY_GLOBAL,
- IZ_LOG_CATEGORY_GENERIC,
- } IZ_LogCategory;
-
- void IZ_LogError(const char* fmt, ...);
- void IZ_LogInfo(IZ_LogCategory category, const char* fmt, ...);
- void IZ_LogWarn(bool is_critical, const char* fmt, ...);
- void IZ_Log(const char* fmt, ...);
-
- #endif
|