$ sudo logwatch --service sshd --debug 100 --output stdout
...
TimeFilter: Period is day
TimeFilter: SearchDate is (2019-10-13T..:..:..\.[0-9]+[+-][0-9]{2}:[0-9]{2} )
TimeFilter: Debug SearchDate is (2019-10-13T \ [0-9]+[+-][0-9]{2} [0-9]{2} )
DEBUG: Inside ApplyStdDate...
DEBUG: Looking For: (Oct 13 ..:..:.. )
DEBUG: Looking For: (2019-10-13T..:..:..\.[0-9]+[+-][0-9]{2}:[0-9]{2} )
export LOGWATCH_LOGFILE_LIST='/var/log/auth.log /var/log/auth.log.1 '
export LOGWATCH_ARCHIVE_LIST='/var/log/auth.log.2.gz /var/log/auth.log.3.gz /var/log/auth.log.4.gz '
Processing Service: sshd
( cat /var/cache/logwatch/logwatch.xV7LYbVy/secure | /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice 'sshd' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/sshd) 2>&1
TimeFilter: Period is day
TimeFilter: SearchDate is ( 2019-Oct-13 ..h ..m ..s )
TimeFilter: Debug SearchDate is ( 2019-Oct-13 h m s )
就是这样。它挂了。该文件/var/cache/logwatch/logwatch.xV7LYbVy/secure
中有一堆日志信息。
如果我说它--service kernel
立即正常完成。我正在运行 Logwatch 7.4.3(发布于 2016 年 12 月 7 日)