From 10ccdc3da103ea7cf4a75ec57334ea5ce57080be Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 9 Jun 2021 19:36:00 +0200 Subject: [PATCH] logger: only attempt logrotate if target is file Signed-off-by: Joachim Wiberg --- src/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger.c b/src/logger.c index 83780e3..bc23ab4 100644 --- a/src/logger.c +++ b/src/logger.c @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) closelog_r(&log); - if (rotate && checksz(fp, size)) + if (logfile && rotate && checksz(fp, size)) logrotate(logfile, num, size); return 0;