Choose your language

Choose your login

Support

How to Enable Debug (collect logs) in the Print Provider

THE PAGE APPLIES TO:

Please also see Reporting Problems

PaperCut has special debug options which cause PaperCut to produce a detailed text log of activity. The log allows our developers to inspect the internal workings of the PaperCut application and pinpoint the cause of problems. Enabling debug logging is only usually required or requested by the PaperCut Support team.

The Print Provider is the component in the PaperCut n-tiered architecture that interfaces with the print queues. It is the layer closest to the printers and hence debug here can help diagnose monitoring related problems.

On Mac or Linux which interacts with CUPS, there also exists 2 processes called: pc-event-monitor and pc-connection-monitor which also add debugging output to the common Print Provider log file and is also enabled in the common Print Provider configuration file.

Note: If you have more than one server, these steps must be done on the server that is hosting the print queue(s) in question. This may or may not be the same server as your PaperCut Application Server. If there is any doubt, please confirm with PaperCut Technical Support.

Note: If you are running only one PaperCut Server, e.g. your print server is also running the PaperCut Application Server, you may skip Step 6 and instead collect debug logs from the Application server.

To enable debug in PaperCut Print Provider:

  1. We’ve supplied helper scripts which can enable and disable debug mode on a server’s print provider. These are located in:
    [app-path]/providers/print/[platform]

  2. Launch debug-enable, which will exist as .bat, .command or .sh format, as appropriate for your operating system. On Windows systems, make sure to run the script as an Administrator (right-click debug-enable.bat, then select “Run as Administrator”).

    This script will also restart any services as necessary (e.g. the PaperCut Print Provider on Windows, papercut.pc-event-monitor on Mac OS etc.). On Novell you will need to restart the iPrint Manager.

    Note: This needs to be run with administrative privileges on recent Windows editions.

    Note: Sometimes you may need to set debug=snapshot in ~papercut/providers/print/linux-[arch]/print-provider.conf to capture a spool file on Mac or Linux. See Capturing a Linux Spool File and Capturing a Mac Spool File. In such cases you should either:

    • run debug-snapshot-enable instead of debug-enable if you are running PaperCut version 13.4 or later, or
    • use the Legacy method below if you are running PaperCut version 13.3 or earlier.
  3. Print a few test documents from a network workstation, or perform the problem action. Try to select a situation that is likely to cause the issue being investigated.

  4. Record the approximate time of the problem and/or the name of any printed documents (or the time you performed the test action). This will help the support team match up log entries with your test activity. Additional information such as what was observed or what was expected would also be useful.

  5. Wait 10 minutes.

  6. Zip and email all the Print Provider log files:

    [app-path]\providers\print\[platform]\print-provider.log*
    [app-path]\providers\print\win\print-monitor.log* - Windows only

    Please include an explanation of the steps taken, along with any other other information requested by the PaperCut Developers.

    Note: if the files are large, please place in a zip archive before sending.

  7. Finally, disable logging by running debug-disable

The video below demonstrates how to enable debug mode in Windows Print Provider

[Legacy] PaperCut version 13.1 or earlier

  1. Open the file:
    [app-path]/providers/print/[platform]/print-provider.conf
    in a text editor.

  2. Under the line #debug=on add the line:
    debug=on

    or
    debug=snapshot (if directed by support)

    Or simply remove the # comment from the existing line.

  3. Save the file.

  4. Some components may need to be restarted before debug logging is enabled′ ’ .

    • If running Windows: restart the PaperCut Print Provider Service under Control Panel → Administrative Tools → Services.
    • If running Novell iPrint: restart the Print Manager from iManager.
    • If running Mac or Linux CUPS: no restart is required for the Print Provider. However, when debugging the pc-event-monitor or pc-connection-monitor (as advised by support), please restart them:
    • On Linux, this can be achieved by running as root:
      # /etc/init.d/papercut-event-monitor restart
    • On Mac, this can be achieved by either rebooting the Mac server or running as root:
      For versions of PaperCut prior to 16.2:
      # launchctl stop papercut.pc-event-monitor; launchctl stop papercut.pc-connection-monitor
      For versions of PaperCut 16.2 and above:
      # launchctl stop papercut.pc-event-monitor
      (note that these processes will be automatically restarted after you stop them).
  5. Print a few test documents from a network workstation, or perform the problem action. Try to select a situation that is likely to cause the issue being investigated.

  6. Record the approximate time of the problem and/or the name of any printed documents (or the time you performed the test action). This will help the developers match up log entries with your test activity. Additional information such as what was observed or what was expected would also be useful.

  7. Wait 10 minutes.

  8. Zip and email all the Print Provider log files.

    [app-path]/providers/print/[platform]/print-provider.log*

    Include an explanation of the steps taken, along with any other other information requested by the PaperCut Developers.

    Note: if the files are large, please place in a zip archive before sending.

    By the way: your log files and other information you send to us will be treated with care in accordance with our privacy policy.

  9. Disable logging by reversing step 2.


Categories: How-to Articles , Logs , Print Queues


Keywords: secondary server debug log diagnostics

Comments

Last updated June 13, 2024