Knowledgebase: PaperCut > Debugging
How to Enable Debug in CUPS
Last modified on 11 August 2020 09:08 PM

From time to time, PaperCut Technical Support will request additional logs from the CUPS printing environment found on many Linux servers, clients and Mac environments. This will aid PaperCut in diagnosing issues that you may have. This KB article is best used in conjunction with the HowToEnableDebugInThePrintProvider article.

CUPS creates a few log files in the default logs directory (normally /var/log/cups/ for Ubuntu, Debian and OS X). We will want to look at error_log primarily. This is a file where CUPS writes information about what it is doing. However, for this file to be useful to us, we have to enable Debug Logging in CUPS first.

Root access

To modify these settings you will likely need root access in a shell or terminal. Once you've opened a shell or terminal, you can then elevate yourself to root by "sudo'ing to it" with:

 "sudo su -"

This should work on all modern Linux operating systems as well as Mac OS X.

Debian / Ubuntu

  • Edit the file /etc/cups/cupsd.conf, find the line LogLevel and change it to LogLevel debug, save the file.
  • Then restart CUPS using one of the locations:
    • sudo /etc/init.d/cupsys restart or
    • sudo /etc/init.d/cups restart

Mac OS X

Enabling and disabling CUPS debug logging is done via cupsctl

  • Enable CUPS debug logging. cupsctl --debug-logging
  • Disable CUPS debug logging. cupsctl --no-debug-logging

Then restart CUPS

  • Prior to Mac OS X 10.5, use this command:
    • sudo /System/Library/StartupItems/PrintingServices/PrintingServices restart
  • In Mac OS X 10.5 and later, use this command (it will then relaunch on demand):
    • sudo launchctl stop org.cups.cupsd

Gather Logs

Once you have enabled debug in CUPS, you will then need to reproduce the issue following any procedures requested by PaperCut Technical Support, then compress and email the /var/log/cups/error_log log file.