From fd82a184a3ffa22906e7c944770fef0da7f8ef81 Mon Sep 17 00:00:00 2001 From: Marian Pritsak Date: Tue, 10 Oct 2017 16:52:46 +0300 Subject: [PATCH] [logrotate.conf]: Truncate log files When creating a new file we have a problem that the handle to an original log file is no longer valid. It can be bad for those programs that write to log file or read from it. So log file now is truncated instead. --- files/image_config/logrotate/logrotate.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/image_config/logrotate/logrotate.conf b/files/image_config/logrotate/logrotate.conf index 6f107e209837..42d127797a51 100644 --- a/files/image_config/logrotate/logrotate.conf +++ b/files/image_config/logrotate/logrotate.conf @@ -5,8 +5,8 @@ daily # Keep 4 days worth of backlogs by default rotate 4 -# create new (empty) log files after rotating old ones -create +# Truncate the original log file to zero size in place after creating a copy +copytruncate # uncomment this if you want your log files compressed #compress