Bug 1479399

Summary: CUPS Admin menu Access and Error Logs empty
Product: [Fedora] Fedora Reporter: Dominique Brazziel <sixerjman>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 26CC: jpopelka, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-14 10:03:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominique Brazziel 2017-08-08 13:53:56 UTC
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):


How reproducible:
Choose 'View Access / Error Log' from the CGI page / Admin.

Steps to Reproduce:
1.
2.
3.

Actual results:
Blank page for both or 'Not Found' for error log.

Expected results:
AccessLog default location '/var/log/cups/access_log' should contain access logs.

Additional info:
journalctl -b -u cups extracts all CUPS messages from the systemd journal.

Comment 1 Zdenek Dohnal 2017-08-14 08:43:52 UTC
Hi,

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.