Red Hat Bugzilla – Bug 1479399
CUPS Admin menu Access and Error Logs empty
Last modified: 2017-08-14 06:03:32 EDT
Description of problem:
When choosing 'View Access Log' from the Admin menu the results are an empty page. Choosing 'View Error Log' is also empty if the ErrorLog definition is '/var/log/error_log'. If the definition is the default 'syslog' the error messages are in the systemd journal but the web page says 'Not Found' (HTTP error 404).
Version-Release number of selected component (if applicable):
Choose 'View Access / Error Log' from the CGI page / Admin.
Steps to Reproduce:
Blank page for both or 'Not Found' for error log.
AccessLog default location '/var/log/cups/access_log' should contain access logs.
journalctl -b -u cups extracts all CUPS messages from the systemd journal.
since https://fedoraproject.org/wiki/Changes/CupsJournalLogging CUPS have been set to use systemd journal by default. CUPS web interface is trying to open file admin/log/error_log, which is actually /var/log/cups/error_log, which doesn't exist, if ErrorLog is set to syslog. There are 3 way how to deal with this issue:
1) write code, which shows output of journal without using any temporary file - but this behavior cups errorlog==syslog==journal is only Fedora specific, so upstream wouldn't accept it.
2) save output of journal into temporary file and show that file in CUPS website - it would be same like having /var/cups/log/error_log and it means pro in not having other log file is gone.
3) set ErrorLog in /etc/cups/cups-files.conf back to /var/log/cups/error_log and logs showing in web interface works fine if you want to check them this way.
As mentioned before, solving this issue is difficult and brings more cons than pros. With that, closing this issue as WONTFIX.