aboutsummaryrefslogtreecommitdiff
path: root/logutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'logutils.h')
-rw-r--r--logutils.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/logutils.h b/logutils.h
deleted file mode 100644
index efc73e2..0000000
--- a/logutils.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef DNS2TCP_LOGUTILS_H
-#define DNS2TCP_LOGUTILS_H
-
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <time.h>
-#undef _GNU_SOURCE
-
-#define LOGINF(fmt, ...) \
- do { \
- struct tm *tm = localtime(&(time_t){time(NULL)}); \
- printf("\e[1;32m%04d-%02d-%02d %02d:%02d:%02d INF:\e[0m " fmt "\n", \
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, \
- tm->tm_hour, tm->tm_min, tm->tm_sec, \
- ##__VA_ARGS__); \
- } while (0)
-
-#define LOGERR(fmt, ...) \
- do { \
- struct tm *tm = localtime(&(time_t){time(NULL)}); \
- printf("\e[1;35m%04d-%02d-%02d %02d:%02d:%02d ERR:\e[0m " fmt "\n", \
- tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, \
- tm->tm_hour, tm->tm_min, tm->tm_sec, \
- ##__VA_ARGS__); \
- } while (0)
-
-#endif