summaryrefslogtreecommitdiff
path: root/logging.c
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-01-21 01:34:58 +0800
committerKeuin <[email protected]>2023-01-21 01:40:19 +0800
commitc3122720152bb00e7c0e0fb86fd2d94a23c4abf9 (patch)
tree0b5f73c4622e482dab7206dc8b31bf0ccc4bddd6 /logging.c
parent2e699d04ad816a401fb481a619e9a3b13dbb9a5e (diff)
Enforce 80 character line limit.HEADmaster
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);
}