diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-01-26 14:58:09 +0200 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-01-26 14:58:09 +0200 |
commit | 5e1ae8b33873661b669eda509fcd000f8a964126 (patch) | |
tree | 6099bee318d9f0033949d23a3eeded6974d34b35 /src/log.h |
very simple work withs html based on file path
Diffstat (limited to 'src/log.h')
-rw-r--r-- | src/log.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h new file mode 100644 index 0000000..000ce95 --- /dev/null +++ b/src/log.h @@ -0,0 +1,14 @@ +#ifndef LOG_H +#define LOG_H + +#define __RED__ "\033[0;31m" +#define __GREEN__ "\033[0;32m" +#define __RESET__ "\033[0m" + +#define STR(x) #x +#define XSTR(x) STR(x) + +#define info(...) fprintf(stdout, __GREEN__"[INFO]"__RESET__" "__VA_ARGS__); fprintf(stdout, "\n") +#define err(...) fprintf(stderr, __RED__"[ERROR]"__RESET__" "__FILE__":"XSTR(__LINE__)": "__VA_ARGS__); fprintf(stderr, "\n") + +#endif |