Hide cron wrapper logs from logs listing
Only show per-run gniza-*.log files in the logs page. Cron wrapper logs (cron-*.log) are redundant with the structured per-run logs and just accumulate noise. They remain accessible via direct URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ sub show_list {
|
|||||||
my @files;
|
my @files;
|
||||||
if (opendir my $dh, $log_dir) {
|
if (opendir my $dh, $log_dir) {
|
||||||
while (my $entry = readdir $dh) {
|
while (my $entry = readdir $dh) {
|
||||||
next unless _valid_log_filename($entry);
|
next unless $entry =~ /^gniza-\d{8}-\d{6}\.log$/;
|
||||||
my $path = "$log_dir/$entry";
|
my $path = "$log_dir/$entry";
|
||||||
next unless -f $path;
|
next unless -f $path;
|
||||||
my @stat = stat($path);
|
my @stat = stat($path);
|
||||||
@@ -61,7 +61,7 @@ sub show_list {
|
|||||||
name => $entry,
|
name => $entry,
|
||||||
size => $stat[7] // 0,
|
size => $stat[7] // 0,
|
||||||
mtime => $stat[9] // 0,
|
mtime => $stat[9] // 0,
|
||||||
type => ($entry =~ /^cron-/) ? 'Cron' : _detect_log_type($path),
|
type => _detect_log_type($path),
|
||||||
status => $status,
|
status => $status,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user