2 .\" cupsd-logs man page for CUPS.
4 .\" Copyright 2007-2014 by Apple Inc.
5 .\" Copyright 1997-2006 by Easy Software Products.
7 .\" These coded instructions, statements, and computer programs are the
8 .\" property of Apple Inc. and are protected by Federal copyright
9 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 .\" which should have been included with this file. If this file is
11 .\" file is missing or damaged, see the license at "http://www.cups.org/".
13 .TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
15 cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
18 normally maintains three log files: \fIaccess_log\fR to track requests that are submitted to the scheduler, \fIerror_log\fR to track progress and errors, and \fIpage_log\fR to track pages that are printed.
19 Configuration directives in
22 .BR cups-files.conf (5)
23 control what information is logged and where it is stored.
24 .SS ACCESS LOG FILE FORMAT
25 The \fIaccess_log\fR file lists each HTTP resource that is accessed by a web browser or client.
26 Each line is in an extended version of the so-called "Common Log Format" used by many web servers and web reporting tools:
29 \fIhost group user date-time \fR"\fImethod resource version\fR" \fIstatus bytes
30 ipp-operation ipp-status\fR
36 10.0.1.2 - - [01/Dec/2005:21:50:28 +0000] "POST / HTTP/1.1" 200 317
37 CUPS-Get-Printers successful-ok-ignored-or-substituted-attributes
38 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1"
40 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1"
41 200 157 CUPS-Get-Printers
42 successful-ok-ignored-or-substituted-attributes
43 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1"
44 200 1411 CUPS-Get-Devices -
45 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1"
49 The \fIhost\fR field will normally only be an IP address unless you have enabled the HostNameLookups directive in the \fIcupsd.conf\fR file or if the IP address corresponds to your local machine.
51 The \fIgroup\fR field always contains "-".
53 The \fIuser\fR field is the authenticated username of the requesting user.
54 If no username and password is supplied for the request then this field contains "-".
56 The \fIdate-time\fR field is the date and time of the request in local time and is in the format "[DD/MON/YYYY:HH:MM:SS +ZZZZ]".
58 The \fImethod\fR field is the HTTP method used: "GET", "HEAD", "OPTIONS", "POST", or "PUT".
59 "GET" requests are used to get files from the server, both for the web interface and to get configuration and log files.
60 "HEAD" requests are used to get information about a resource prior to a "GET".
61 "OPTIONS" requests are used to upgrade connections to TLS encryption.
62 "POST" requests are used for web interface forms and IPP requests.
63 "PUT" requests are used to upload configuration files.
65 The \fIresource\fR field is the filename of the requested resource.
67 The \fIversion\fR field is the HTTP specification version used by the client.
68 For CUPS clients this will always be "HTTP/1.1".
70 The \fIstatus\fR field contains the HTTP result status of the request, as follows:
77 File created/modified successfully.
80 The requested file has not changed.
83 Bad HTTP request; typically this means that you have a malicious program trying to access your server.
86 Unauthorized, authentication (username + password) is required.
89 Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access.
92 The file or resource does not exist.
95 URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
98 Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
101 Upgrading to TLS-encrypted connection.
104 Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
107 The client requested encryption but encryption support is not enabled/compiled in.
110 HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
113 The \fIbytes\fR field contains the number of bytes in the request.
114 For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client.
116 The \fIipp-operation\fR field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
118 The \fIipp-status\fR field contains either "-" for non-IPP requests or the IPP status code name for POST requests containing an IPP response.
119 .SS ERROR LOG FILE FORMAT
120 The \fIerror_log\fR file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the
122 file controls which messages are logged:
125 level date-time message
131 I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'.
132 D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]="DeskJet"
133 D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]="1"
134 D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]="mike"
135 D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]="myjob"
136 D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]="1"
137 D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]="media=
138 na_letter_8.5x11in sides=one-sided"
139 D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]="/var/spool/cups/
141 I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'.
142 I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'.
145 The \fIlevel\fR field contains the type of message:
148 Alert message (LogLevel alert)
151 Critical error message (LogLevel crit)
154 Debugging message (LogLevel debug)
157 Detailed debugging message (LogLevel debug2)
160 Normal error message (LogLevel error)
163 Informational message (LogLevel info)
166 Notice message (LogLevel notice)
169 Warning message (LogLevel warn)
172 Emergency error message (LogLevel emerg)
174 The \fIdate-time\fR field contains the date and time of when the page started printing. The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
176 The \fImessage\fR field contains a free-form textual message.
177 Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
178 .SS PAGE LOG FILE FORMAT
179 The \fIpage_log\fR file lists each page or group of pages that are sent to a printer.
180 By default, each line contains the following information:
183 \fIprinter user job-id date-time page-number num-copies job-billing
184 job-originating-host-name job-name media sides\fR
186 \fIprinter user job-id date-time \fBtotal \fInum-impressions job-billing
187 job-originating-host-name job-name media sides\fR
190 For example the entries for a two page job called "myjob" might look like:
193 DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
194 localhost myjob na_letter_8.5x11in one-sided
195 DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
196 localhost myjob na_letter_8.5x11in one-sided
198 DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
199 localhost myjob na_letter_8.5x11in one-sided
202 The PageLogFormat directive in the
204 file can be used to change this information.
206 The \fIprinter\fR field contains the name of the printer that printed the page.
207 If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
209 The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
211 The \fIjob-id\fR field contains the job number of the page being printed.
213 The \fIdate-time\fR field contains the date and time of when the page started printing.
214 The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
216 The \fIpage-number\fR and \fInum-copies\fR fields contain the page number and number of copies being printed of that page.
217 For printers that cannot produce copies on their own, the num-copies field will always be 1.
219 Lines containing the keyword "total" have a \fInum-impressions\fR field instead which provides the total number of impressions (sides) that have been printed on for the job.
221 The \fIjob-billing\fR field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided.
223 The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
225 The \fIjob-name\fR field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided.
227 The \fImedia\fR field contains a copy of the media or media-col/media-size attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided.
229 The \fIsides\fR field contains a copy of the sides attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided.
233 .BR cups-files.conf (5),
234 CUPS Online Help (http://localhost:631/help)
236 Copyright \[co] 2007-2015 by Apple Inc.