Asif Bacchus 2020-05-24 03:32:52 -06:00
parent fc0ad73acb
commit 1a667df39e

@ -0,0 +1,45 @@
# logfile-group file (/etc/logwatch/conf/logfiles/backup.conf)
## Log file location
Update this as needed to point to the location and name of the log file generated by the backup script. Remember, by default, the log file is created in the same directory as the script itself.
```Ini
LogFile = /path/to/your/backup.log
...
```
Best practices suggest you use the backup script's *-l* flag to change this location to something like */var/log/backup.log*, for example. In that case, the entry would look like:
```Ini
LogFile = /var/log/backup.log
...
```
## Archive location and name format
If you want Logwatch to process old (archived) log files generated by something like *logrotate*, then you have to specify the location and file name format of those files. I've included the generalized compressed format of such rotated files as the default in the script. Suppose you store your log files in the recommended location (*/var/log/*) and are using *Logrotate* with compression enabled, the archive line would look like:
```Ini
...
Archive = /var/log/backup.log.?.gz
...
```
This would tell Logwatch, when the archive option is set to true, that your *backup.log* files are archived as: *backup.log.1.gz*, *backup.log.2.gz*, etc. and are all located in */var/log/*.
**Note: This line is totally optional and only used if you set the archive option in Logwatch to true (default). You can comment/delete this line if you wish.**
## External script for timestamp processing
Since the log file uses a non-standard (according to Logwatch) method of datestamping, a custom filter had to be created. See [page 7.x.x]() of this wiki more information.
The script file is called with an *\** before the filename.
```Ini
...
*sqFullStampAnywhere
...
```
If you change the name of this file, you will have to change this line. Remember that whatever you type here as a name is converted to all-lowercase so your filename should be all lowercase also.