Asif Bacchus 2020-05-24 03:43:59 -06:00
parent da8fdb745d
commit aca5c66ab3
1 changed files with 3 additions and 3 deletions

@ -1,8 +1,8 @@
# Timestamp processing script (/etc/logwatch/scripts/shared/sqfullstampanywhere)
# timestamp processing script (/etc/logwatch/scripts/shared/sqfullstampanywhere)
This is basically a modified version of the '*applyeurodate*' script that comes with Logwatch. It had to be modified to search within [square brackets] and to accept characters coming before the stamp (i.e. ANSI colour codes). If you change the '**stamp**' variable in the backup script to update the timestamp to your liking (which to totally fine!) then you'll probably have to update this file. There are two lines you need to modify to suit your new '**stamp**' variable.
### The time format specification
### the time format specification
'*$SearchDate*' is the variable used in the PERL script to do exactly what it says, search for the date stamp. I have it set up to look for the format '*year-month-date hour:minute:second*'. Note, we don't care about brackets or anything here, we're just defining the format of the date/time stamp.
@ -20,7 +20,7 @@ $SearchDate = TimeFilter('%m/%d/%Y %H:%M');
...
```
### The search REGEX
### the search REGEX
The PERL script uses a '*regular expression*' (REGEX) to search within the log file for '*$SearchDate*'. For the default datestamp, this specification looks like: