From c3122720152bb00e7c0e0fb86fd2d94a23c4abf9 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 21 Jan 2023 01:34:58 +0800 Subject: Enforce 80 character line limit. --- logging.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'logging.c') 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); } -- cgit v1.2.3