How to Enable Debug in CUPS

KB Home   |   How to Enable Debug in CUPS

Please also see Reporting Problems

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 macOS). 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 macOS.

Debian / Ubuntu

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 using one of the locations:

  • sudo /etc/init.d/cupsys restart or
  • sudo /etc/init.d/cups restart

macOS

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 macOS 10.5, use this command:
    • sudo /System/Library/StartupItems/PrintingServices/PrintingServices restart
  • In macOS 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. By the way: your log files and other information you send to us will be treated with care in accordance with our privacy policy.


Categories: Debugging, Troubleshooting


Keywords:

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on March 07, 2019, at 04:56 AM
Printable View   |   Article History   |   Edit Article