Steps below will guide how to configure CUPS to produce debug information and how to capture it.
1. Open the cups configuration file /etc/cups/cupsd.conf with a text editor.
# vi /etc/cups/cupsd.conf
It would look something like this:
MaxLogSize 0 # # "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $" # # Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a # complete description of this file. # # Log general information in error_log - change "warn" to "debug" # for troubleshooting... LogLevel warn
# # "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $" # # Sample configuration file for the Common UNIX Printing System (CUPS) # scheduler. See "man cupsd.conf" for a complete description of this # file. # # Log general information in error_log - change "info" to "debug" for # troubleshooting... LogLevel info
2. We need to edit the LogLevel line to look like the following:
3. Save the file now.
How to Capture the Log
1. Open two different terminal windows as a root user.
2. In one of the Terminal Run the following command:
# tail -f /var/log/cups/error_log > /tmp/cups_debug_error.txt
Let this command run while the following steps are performed.
3. In the other terminal, do the following:
# service cups restart
4. Now follow the steps to recreate the Issue which you are facing with the Printer.
– One the first Terminal, Press, Ctrl-C to Stop the tail command.
– Once the logs have been captured, reset the Loglevel to the default and restart the cups service.
More options with LogLevel
- debug2 – Log everything.
- debug – Log almost everything.
- info – Log all requests and state changes.
- warn – Log errors and warnings.
- error – Log only errors.
- none – Log nothing.