logger: only attempt logrotate if target is file

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2021-06-09 19:36:00 +02:00
parent 17b68ca89a
commit 10ccdc3da1

View File

@ -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;