Skip to content

Commit

Permalink
no longer include no_minus_d and also fix date chomping
Browse files Browse the repository at this point in the history
  • Loading branch information
VVelox committed May 26, 2023
1 parent 50789b6 commit c905dce
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions snmp/logsize
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,14 @@ if ( !defined( $config->{log_end} ) ) {

# set the default log chomp
if ( !defined( $config->{log_chomp} ) ) {
$config->{log_chomp} = '((\-\d+)*\.log|\.today|\.json|\-' . $today_name . '|\-' . $today_name_alt1 . ')$';
$config->{log_chomp} = '((\-\d\d\d\d\d\d\d\d)*\.log|\.today|\.json|\-' . $today_name . '|\-' . $today_name_alt1 . ')$';
}

# how long to keep a file in the cache
if ( !defined( $config->{max_age} ) ) {
$config->{max_age} = 30;
}

# if no_minus_d is defined, default to it being disabled
if ( !defined( $config->{no_minus_d} ) ) {
$config->{no_minus_d} = 1;
}
$return_json->{data}{no_minus_d} = $config->{no_minus_d};

# if it exists, make sure it is a directory
if ( -e $config->{cache_dir} && !-d $config->{cache_dir} ) {
$return_json->{error} = 6;
Expand Down

0 comments on commit c905dce

Please sign in to comment.