/usr/share/logtail/detectrotate/30-logrotate-dateext.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="";
# find out whether we have a dateext rotation scheme
my @list = glob("$filename-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]");
if ( @list ) {
$rotated_filename = (sort(glob("$filename-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]")))[-1];
}
return $rotated_filename;
}
|