/usr/share/logtail/detectrotate/10-savelog.dtr is in logtail 1.3.15.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 | #!/usr/bin/perl
sub {
my ($filename) = @_;
my $rotated_filename="";
if (-e "$filename.0" && -e "$filename.1.gz" && (mtime("$filename.0") > mtime("$filename.1.gz")) ) {
# assume the log is rotated by savelog(8)
# syslog-ng leaves old files here
$rotated_filename="$filename.0";
}
return $rotated_filename;
}
|