appliance index: rotate update log if bigger than 256 KiB

50 KiB is really tiny and while this log file is not _that_ important,
spending a few KiB more to keep much older logs around is almost
always a win-win situation, now that root storage size is rather some
hundred GB in most setups.

Drop the unused size variable while touching this, which was the
actual thing that made me look closer here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-02-20 13:40:31 +01:00
parent 6e7cef4923
commit 805cae93fd

View File

@ -213,8 +213,7 @@ sub get_apl_sources {
sub update {
my ($proxy) = @_;
my $size;
if (($size = (-s $logfile) || 0) > (1024*50)) {
if (-s $logfile || 0 > 1024 * 256) {
rename($logfile, "$logfile.0");
}
my $logfd = IO::File->new (">>$logfile");