Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page log info is not saved when PageLog is set to syslog #4798

Closed
akorobkin opened this issue Apr 4, 2016 · 7 comments

Comments

@akorobkin
Copy link

commented Apr 4, 2016

When PageLog is set to syslog, and PageLogFormat is set to default "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}" value, pagelog info is not saved into syslog.

All I see is POST requests (syslog):

Apr  4 10:15:11 printserver5 cupsd[7129]: REQUEST localhost - - "POST /printers/printer-color HTTP/1.1" 200 517 Create-Job successful-ok
Apr  4 10:15:11 printserver5 cupsd[7129]: REQUEST localhost - - "POST /printers/printer-color HTTP/1.1" 200 2328 Send-Document successful-ok

This is CUPS 2.1.3, Ubuntu 14.04 x64 server.

My configuration:
/etc/cups/cups-files.conf:
PageLog syslog

/etc/cups/cupsd.conf:
PageLogFormat "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}"

$ cupsctl

_debug_logging=0
_remote_admin=0
_remote_any=0
_share_printers=0
_user_cancel_any=0
DefaultAuthType=Basic
DefaultPaperSize=none
ErrorPolicy=retry-job
FilterNice=5
ListenBacklog=1024
MaxClients=20000
MaxClientsPerHost=1000
MaxJobs=500
MaxJobsPerPrinter=50
MaxJobTime=3600
MaxLogSize=1000000000
PageLogFormat="%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}"
PreserveJobFiles=Off
ServerAdmin=printing-team@acme.com
ServerAlias=*
ServerName=printserver5

@michaelrsweet michaelrsweet self-assigned this Apr 4, 2016

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

commented Apr 4, 2016

What is your syslogd/systemd configuration for logging these messages?

@akorobkin

This comment has been minimized.

Copy link
Author

commented Apr 4, 2016

I'm on rsyslog which resembles traditional syslog, but I'd assume the events are logged with "info" level?

# Log all info-level and above messages, except for auth events
*.info;auth,authpriv.none   /var/log/syslog;RSYSLOG_TraditionalFileFormat

@akorobkin

This comment has been minimized.

Copy link
Author

commented Apr 6, 2016

Even if I put "PageLog /var/log/cups/page_log" into /etc/cups/cups-files.conf, I get nothing. The file gets created automatically at CUPS restart with root:adm 644 permissions, and stays empty.

error_log has no mention of PageLog or page_log with debug logging enabled.

@spikedrba

This comment has been minimized.

Copy link

commented May 21, 2016

having the same issue, ubuntu 16.04, cups 1.7.2, I get no logs in page log, but also nothing in error_log (despite errors about filter failed, which at this point I have nothing to investigate). I don't know that this issue is "low" since basically by default it's impossible to debug any issue.

@akorobkin

This comment has been minimized.

Copy link
Author

commented May 24, 2016

After some debugging on this I can clarify the actual bug a bit better:

Jobs are not getting registered in the PageLog, be it a file or syslog, whenever there is a cupsFilter or cupsFilter2 keyword mentioned in the PPD. Removing cupsFilter keyword makes jobs being logged again.

*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"

Tested with CUPS 2.1.3 on Ubuntu 14.04. Users from the mailing list report similar issue on other platforms.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator

commented May 24, 2016

This is a problem with the driver - when it accepts vnd.cups-postscript it is responsible for logging pages, not the standard CUPS filters.

@tillkamppeter

This comment has been minimized.

Copy link

commented Jun 7, 2016

Fixed missing page logging facility in cups-filters for pdftopdf (PDF printers), foomatic-rip (old method worked only for old PostScript workflow and only with Ghostscript), and gstopxl (simple Ghostscript wrapper script). BZR rev. 7468. Will be included in 1.9.0 release (in the next days).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.