summaryrefslogtreecommitdiff
path: root/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'logging.c')
-rw-r--r--logging.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/logging.c b/logging.c
index 2ad1704..90ccf23 100644
--- a/logging.c
+++ b/logging.c
@@ -3,6 +3,7 @@
//
#include "logging.h"
+#include "validate.h"
#include <stdio.h>
@@ -17,6 +18,10 @@ void log_free(void *logger) {
}
void log_print(void *logger, const char *level, time_t ts, const char *filename, int lineno, const char *msg) {
+ NOTNULL(logger);
+ NOTNULL(level);
+ NOTNULL(filename);
+ NOTNULL(msg);
char timestr[32];
strftime(timestr, 31, "%Y-%m-%d %H:%M:%S", localtime(&ts));
if (fprintf(logger, "[%s][%s][%s][%d] %s\n", timestr, level, filename, lineno, msg))