From a262dc8acd581052ee6b5d5430af69148540a843 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sat, 23 Aug 2025 00:01:31 +0200 Subject: Move to luajit and fix logs --- src/log.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/log.c (limited to 'src/log.c') diff --git a/src/log.c b/src/log.c deleted file mode 100644 index b41c0ab..0000000 --- a/src/log.c +++ /dev/null @@ -1,37 +0,0 @@ -#ifdef _RELEASE - -#define ANY_LOG_FORMAT_BEFORE(stream, level, context, module, func) \ - fprintf(stream, "[%s%s%s%s%s%s%s] %s%s%s: ", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_CONTEXT), context, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *context ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_MODULE), *func ? func : module, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), \ - ANY_LOG_COLOR_GET(level), any_log_level_strings[level], ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET)) - -#define ANY_LOG_VALUE_BEFORE(stream, level, context, module, func, message) \ - fprintf(stream, "[%s%s%s%s%s%s%s] %s%s%s: %s [", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_CONTEXT), context, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *context ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_MODULE), *func ? func : module, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), \ - ANY_LOG_COLOR_GET(level), any_log_level_strings[level], ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), message) -#else - -#define ANY_LOG_FORMAT_BEFORE(stream, level, context, module, func) \ - fprintf(stream, "[%s%s%s%s%s%s%s%s%s%s%s] %s%s%s: ", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_CONTEXT), context, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *context ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_MODULE), module, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *func ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_FUNC), func, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), \ - ANY_LOG_COLOR_GET(level), any_log_level_strings[level], ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET)) - -#define ANY_LOG_VALUE_BEFORE(stream, level, context, module, func, message) \ - fprintf(stream, "[%s%s%s%s%s%s%s%s%s%s%s] %s%s%s: %s [", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_CONTEXT), context, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *context ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_MODULE), module, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), *func ? " " : "", \ - ANY_LOG_COLOR_GET(ANY_LOG_COLOR_FUNC), func, ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), \ - ANY_LOG_COLOR_GET(level), any_log_level_strings[level], ANY_LOG_COLOR_GET(ANY_LOG_COLOR_RESET), message) -#endif - -#define ANY_LOG_VALUE_STRING(stream, key, value) \ - fprintf(stream, "%s=\"%s\"", key, value ? value : "(null)") - -#define ANY_LOG_COLOR_CONTEXT_DEFAULT "\x1b[34m" - -#define ANY_LOG_IMPLEMENT -#include "log.h" -- cgit v1.2.3