= CUPS Journal Logging
By default, CUPS will send log output to the system journal rather than /var/log/cups/error_log.
- Name: Tim Waugh
- Email: firstname.lastname@example.org
- Release notes owner:
- Targeted release: Fedora 21
- Last updated: 2014-03-11
- Tracker bug: <will be assigned by the Wrangler>
CUPS has traditionally sent log output to the /var/log/cups/error_log file. In Fedora 20, CUPS was enhanced to be able to send log output to the system journal, including useful information such as the corresponding job ID. I've written more about this elsewhere.
Benefit to Fedora
Some of the benefits of systemd's journald come from it being the central point for logging. In particular, diagnosing print issues becomes easier if the CUPS log messages are interleaved with syslog messages (e.g. from the hp backend in HPLIP).
Having structure to the logs also makes it easier to retrieve log messages that concerned a particular job ("journalctl CUPS_JOB_ID=13").
The proposed change is for the ErrorLog target only. The PageLog and AccessLog defaults will remain as before, files in /var/log/cups.
The default log level will remain unchanged, at "info". This is low traffic, only including verbose output for failed jobs.
The work involved is a simple one-line change in /etc/cups/cups-files.conf to change the ErrorLog line to read "ErrorLog journal", and potentially a note in /var/log/cups/error_log (in log format) describing a journalctl command to retrieve the CUPS logs.
- Proposal owners:
The change noted above is all that is required.
This is a configuration file change, so a modified CUPS installation will stay as it is and not be affected.
This change only affects the default. The configuration can be changed back to use the /var/log/cups/error_log file if this is preferred.
How To Test
During normal operation, printing some files, there should not be a large increase in journal entries.
A failed print job (e.g. filter crashed) should cause filter and backend output to be sent to the journal.
The journalctl command should be able to retrieve job-specific journal entries.
Most people will not notice this change.
System administrators will be able to analyse CUPS issues more easily.
N/A (not a System Wide Change)
The default CUPS logging target is now the system journal. To retrieve CUPS logs use "journalctl _COMM=cupsd".