Hi, Friends,

I find a new way to show logwatch result for clamav freshclam log in journalctl 
correctly.
I have removed apt package in UBUNTU, and I have switched to use logwatch-7.13 
from opensource.


$ sudo nano /etc/logwatch/conf/services/clam-update.conf 
### Added by JIR 250830
LogFile =
LogFile = none
*JournalCtl = "--output=cat --unit=clamav-freshclam.service"


$ ls -al /etc/logwatch/scripts/services/clam-update
-rwxr-x--- 1 root root 224  8月 30 16:45 
/etc/logwatch/scripts/services/clam-update
$ sudo nano /etc/logwatch/scripts/services/clam-update
#!/usr/bin/perl
### Added by JIR 250830
while (<STDIN>) {
    if (/ClamAV update process started/) {
        print $_;
    }
    elsif (/daily\.cld updated/) {
        print $_;
    }
    elsif (/Database test passed/) {
        print $_;


In this new configures, it may try this command:
$ sudo logwatch --output stdout --service clam-update
 ################### Logwatch 7.13 (07/22/25) #################### 
        Processing Initiated: Sat Aug 30 16:54:49 2025
        Date Range Processed: yesterday
                              ( 2025-Aug-29 )
                              Period is day.
        Detail Level of Output: 0
        Type of Output/Format: stdout / text
        Logfiles for Host: 
 ################################################################## 
 
 --------------------- clam-update Begin ------------------------ 

 ClamAV update process started at Fri Aug 29 00:00:33 2025
 Database test passed.
 Fri Aug 29 00:00:39 2025 -> daily.cld updated (version: 27746, sigs: 2076468, 
f-level: 90, builder: raynman)
 ClamAV update process started at Fri Aug 29 12:00:39 2025
 
 ---------------------- clam-update End ------------------------- 

 
 ###################### Logwatch End ######################### 


$ sudo logwatch --output stdout --service clam-update --range all
 ################### Logwatch 7.13 (07/22/25) #################### 
        Processing Initiated: Sat Aug 30 17:03:58 2025
        Date Range Processed: all
        Detail Level of Output: 0
        Type of Output/Format: stdout / text
        Logfiles for Host: 
 ################################################################## 
 
 --------------------- clam-update Begin ------------------------ 

 ClamAV update process started at Thu Aug  7 16:35:19 2025
 ClamAV update process started at Fri Aug  8 04:35:19 2025
 Database test passed.
 Fri Aug  8 04:35:26 2025 -> daily.cld updated (version: 27725, sigs: 2076396, 
f-level: 90, builder: raynman)
 ClamAV update process started at Fri Aug  8 16:35:26 2025
 ClamAV update process started at Sat Aug  9 04:35:26 2025
 Database test passed.
 Sat Aug  9 04:35:32 2025 -> daily.cld updated (version: 27726, sigs: 2076402, 
f-level: 90, builder: raynman)
.
... and so on ...
.
 ClamAV update process started at Thu Aug 28 12:00:33 2025
 ClamAV update process started at Fri Aug 29 00:00:33 2025
 Database test passed.
 Fri Aug 29 00:00:39 2025 -> daily.cld updated (version: 27746, sigs: 2076468, 
f-level: 90, builder: raynman)
 ClamAV update process started at Fri Aug 29 12:00:39 2025
 ClamAV update process started at Sat Aug 30 00:00:39 2025
 Database test passed.
 Sat Aug 30 00:00:46 2025 -> daily.cld updated (version: 27747, sigs: 2076429, 
f-level: 90, builder: raynman)
 ClamAV update process started at Sat Aug 30 12:00:46 2025
 
 ---------------------- clam-update End ------------------------- 

 
 ###################### Logwatch End ######################### 


The new call way is felt as same as my expected result:
$ sudo journalctl --unit=clamav-freshclam.service --since yesterday 
--output=cat | /etc/logwatch/scripts/services/clam-update
ClamAV update process started at Fri Aug 29 00:00:33 2025
Database test passed.
Fri Aug 29 00:00:39 2025 -> daily.cld updated (version: 27746, sigs: 2076468, 
f-level: 90, builder: raynman)
ClamAV update process started at Fri Aug 29 12:00:39 2025
ClamAV update process started at Sat Aug 30 00:00:39 2025
Database test passed.
Sat Aug 30 00:00:46 2025 -> daily.cld updated (version: 27747, sigs: 2076429, 
f-level: 90, builder: raynman)
ClamAV update process started at Sat Aug 30 12:00:46 2025

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2067608

Title:
  clamav-freshclam 1.0.5 and logwatch 7.7-1 fails to report

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/2067608/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to