kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 824d6421d5a006c5b6575be0b1b24388acfedf7a
parent 983f5a03f5c034975b2803a02571914e30008c29
Author: Joris Vink <joris@coders.se>
Date:   Mon, 13 Sep 2021 22:54:05 +0200

Use correct format for strftime().

Diffstat:
src/log.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/log.c b/src/log.c @@ -149,8 +149,8 @@ log_print(int prio, const char *fmt, ...) time(&now); t = localtime(&now); - if (strftime(tbuf, sizeof(tbuf), "%y-%m-%d %H:%S:%M", t) > 0) - fprintf(fp, "%s ", tbuf); + if (strftime(tbuf, sizeof(tbuf), "%y-%m-%d %H:%M:%S", t) > 0) + fprintf(fp, "[%ld] %s ", now, tbuf); vfprintf(fp, fmt, args); fflush(fp);