[cups.development] [RFE] STR #2616: Log failed IPP requests as errors
Bryan Henderson
bryanh at giraffe-data.com
Sun Dec 2 09:56:03 PST 2007
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
I found it really hard to debug configuration problems where CUPS rejects a
print job, because the Windows client either doesn't get any detail on the
reason for rejection or chooses not to pass it on to the user. So I think
when CUPS rejects a request, it should log the reason as ERROR severity:
diff --unif --new-file --rec cups-1.3.4/scheduler/ipp.c
cups/scheduler/ipp.c
--- cups-1.3.4/scheduler/ipp.c 2007-10-22 20:27:22.000000000 +0000
+++ cups/scheduler/ipp.c 2007-11-18 23:36:00.000000000 +0000
@@ -649,11 +649,17 @@
if (con->response)
{
+ int logLevel;
+ if (con->response->request.status.status_code >= IPP_BAD_REQUEST)
+ logLevel = CUPSD_LOG_ERROR;
+ else
+ logLevel = CUPSD_LOG_DEBUG;
+
/*
* Sending data from the scheduler...
*/
- cupsdLogMessage(CUPSD_LOG_DEBUG,
+ cupsdLogMessage(logLevel,
"cupsdProcessIPPRequest: %d status_code=%x (%s)",
con->http.fd,
con->response->request.status.status_code,
ippErrorString(con->response->request.status.status_code));
Link: http://www.cups.org/str.php?L2616
Version: -feature
More information about the cups
mailing list