diff options
author | Chris Robinson <[email protected]> | 2023-07-01 06:07:11 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-07-01 06:07:11 -0700 |
commit | 548f7ad80abc253a38171b7e4eb1c84a6b179a41 (patch) | |
tree | c21cf749ac11cb4a9bd90861f426716a3ed100da /core/logging.h | |
parent | 0cad3f7391959d1ad83f948df37db608e3f0e72c (diff) |
Don't pass the file handle to al_print
Diffstat (limited to 'core/logging.h')
-rw-r--r-- | core/logging.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/logging.h b/core/logging.h index f4b6ab56..c99c4e45 100644 --- a/core/logging.h +++ b/core/logging.h @@ -17,35 +17,35 @@ extern LogLevel gLogLevel; extern FILE *gLogFile; #ifdef __USE_MINGW_ANSI_STDIO -[[gnu::format(gnu_printf,3,4)]] +[[gnu::format(gnu_printf,2,3)]] #else -[[gnu::format(printf,3,4)]] +[[gnu::format(printf,2,3)]] #endif -void al_print(LogLevel level, FILE *logfile, const char *fmt, ...); +void al_print(LogLevel level, const char *fmt, ...); #if (!defined(_WIN32) || defined(NDEBUG)) && !defined(__ANDROID__) #define TRACE(...) do { \ if(gLogLevel >= LogLevel::Trace) UNLIKELY \ - al_print(LogLevel::Trace, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Trace, __VA_ARGS__); \ } while(0) #define WARN(...) do { \ if(gLogLevel >= LogLevel::Warning) UNLIKELY \ - al_print(LogLevel::Warning, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Warning, __VA_ARGS__); \ } while(0) #define ERR(...) do { \ if(gLogLevel >= LogLevel::Error) UNLIKELY \ - al_print(LogLevel::Error, gLogFile, __VA_ARGS__); \ + al_print(LogLevel::Error, __VA_ARGS__); \ } while(0) #else -#define TRACE(...) al_print(LogLevel::Trace, gLogFile, __VA_ARGS__) +#define TRACE(...) al_print(LogLevel::Trace, __VA_ARGS__) -#define WARN(...) al_print(LogLevel::Warning, gLogFile, __VA_ARGS__) +#define WARN(...) al_print(LogLevel::Warning, __VA_ARGS__) -#define ERR(...) al_print(LogLevel::Error, gLogFile, __VA_ARGS__) +#define ERR(...) al_print(LogLevel::Error, __VA_ARGS__) #endif #endif /* CORE_LOGGING_H */ |