From a14da2fe3864712dab4e7c4cfb5c323026d668de Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Fri, 10 Jul 2026 16:01:57 +0530 Subject: moving header files to include directory & moving resources in it's own directory i know currently there is race condition, but the code is getting too messy, i will continue to this after i make a vis tool to analyse how i should split up files & stuff the code rn needs intense restructing for it to make any more progress --- src/logger/logger.h | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/logger/logger.h (limited to 'src/logger/logger.h') diff --git a/src/logger/logger.h b/src/logger/logger.h deleted file mode 100644 index abcdb6d..0000000 --- a/src/logger/logger.h +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include - -#ifndef LOG_LEVEL - #define LOG_LEVEL 3 -#endif - -#ifndef HAS_LOG_MODULE -#ifndef LOG_MODULE - #define HAS_LOG_MODULE 0 - #define LOG_MODULE "" -#else - #define HAS_LOG_MODULE 1 -#endif -#endif - -#if LOG_LEVEL >= 3 -#define log_infof(...) do { \ - char log_buf[1024]; \ - int n = 1; \ - log_buf[0] = 'i'; \ - if (HAS_LOG_MODULE == 1) { \ - n = snprintf(log_buf + 1, 1023, "(%s) ", LOG_MODULE); \ - } \ - snprintf(log_buf + n, 1024 - n, __VA_ARGS__); \ - send_log(logging, log_buf, 1024); \ -} while(0); -#endif // LOG_LEVEL >= 3 - -#if LOG_LEVEL >= 2 -#define log_warnf(...) do { \ - char log_buf[1024]; \ - int n = 1; \ - log_buf[0] = 'w'; \ - if (HAS_LOG_MODULE == 1) { \ - n = snprintf(log_buf + 1, 1023, "(%s) ", LOG_MODULE); \ - } \ - snprintf(log_buf + n, 1024 - n, __VA_ARGS__); \ - send_log(logging, log_buf, 1024); \ -} while(0); -#endif // LOG_LEVEL >= 2 - -#if LOG_LEVEL >= 1 -#define log_errof(...) do { \ - char log_buf[1024]; \ - int n = 1; \ - log_buf[0] = 'e'; \ - if (HAS_LOG_MODULE == 1) { \ - n = snprintf(log_buf + 1, 1023, "(%s) ", LOG_MODULE); \ - } \ - snprintf(log_buf + n, 1024 - n, __VA_ARGS__); \ - send_log(logging, log_buf, 1024); \ -} while(0); -#endif // LOG_LEVEL >= 1 - - -#ifndef log_infof -#define log_infof(...) (void)0 -#endif -#ifndef log_warnf -#define log_warnf(...) (void)0 -#endif -#ifndef log_errof -#define log_errof(...) (void)0 -#endif - -void send_log(mqd_t target, const char* msg, int n); -- cgit v1.2.3