summaryrefslogtreecommitdiff
path: root/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'logging.c')
-rw-r--r--logging.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/logging.c b/logging.c
index 90ccf23..b5f8907 100644
--- a/logging.c
+++ b/logging.c
@@ -17,15 +17,18 @@ void log_free(void *logger) {
fclose(logger);
}
-void log_print(void *logger, const char *level, time_t ts, const char *filename, int lineno, const char *msg) {
+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))
+ if (fprintf(logger, "[%s][%s][%s][%d] %s\n", timestr, level, filename,
+ lineno, msg))
fflush(logger);
- if (fprintf(stderr, "[%s][%s][%s][%d] %s\n", timestr, level, filename, lineno, msg))
+ if (fprintf(stderr, "[%s][%s][%s][%d] %s\n", timestr, level, filename,
+ lineno, msg))
fflush(stderr);
}