]> git.ipfire.org Git - thirdparty/cups.git/blame - man/cupsd-logs.man
The scheduler did not write out dirty configuration and state files if there
[thirdparty/cups.git] / man / cupsd-logs.man
CommitLineData
25d0c3fe 1.\"
bf1bc4c6 2.\" cupsd-logs man page for CUPS.
25d0c3fe
MS
3.\"
4.\" Copyright 2007-2014 by Apple Inc.
5.\" Copyright 1997-2006 by Easy Software Products.
6.\"
e3101897 7.\" Licensed under Apache License v2.0. See the file "LICENSE" for more information.
25d0c3fe 8.\"
bf1bc4c6 9.TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
25d0c3fe 10.SH NAME
bf1bc4c6 11cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
25d0c3fe 12.SH DESCRIPTION
bf1bc4c6
MS
13.BR cupsd (8)
14normally 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.
15Configuration directives in
16.BR cupsd.conf (5)
17and
18.BR cups-files.conf (5)
19control what information is logged and where it is stored.
20.SS ACCESS LOG FILE FORMAT
21The \fIaccess_log\fR file lists each HTTP resource that is accessed by a web browser or client.
22Each line is in an extended version of the so-called "Common Log Format" used by many web servers and web reporting tools:
23.nf
24
25 \fIhost group user date-time \fR"\fImethod resource version\fR" \fIstatus bytes
26 ipp-operation ipp-status\fR
27
28.fi
29For example:
30.nf
31
32 10.0.1.2 - - [01/Dec/2005:21:50:28 +0000] "POST / HTTP/1.1" 200 317
33 CUPS-Get-Printers successful-ok-ignored-or-substituted-attributes
34 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1"
35 200 0 - -
36 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1"
37 200 157 CUPS-Get-Printers
38 successful-ok-ignored-or-substituted-attributes
39 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1"
40 200 1411 CUPS-Get-Devices -
41 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1"
42 200 6667 - -
43
44.fi
45The \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.
46.LP
47The \fIgroup\fR field always contains "-".
48.LP
49The \fIuser\fR field is the authenticated username of the requesting user.
50If no username and password is supplied for the request then this field contains "-".
51.LP
52The \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]".
53.LP
54The \fImethod\fR field is the HTTP method used: "GET", "HEAD", "OPTIONS", "POST", or "PUT".
55"GET" requests are used to get files from the server, both for the web interface and to get configuration and log files.
56"HEAD" requests are used to get information about a resource prior to a "GET".
57"OPTIONS" requests are used to upgrade connections to TLS encryption.
58"POST" requests are used for web interface forms and IPP requests.
59"PUT" requests are used to upload configuration files.
60.LP
61The \fIresource\fR field is the filename of the requested resource.
62.LP
63The \fIversion\fR field is the HTTP specification version used by the client.
64For CUPS clients this will always be "HTTP/1.1".
65.LP
66The \fIstatus\fR field contains the HTTP result status of the request, as follows:
67.RS 5
68.TP 5
69200
70Successful operation.
71.TP 5
72201
73File created/modified successfully.
74.TP 5
75304
76The requested file has not changed.
77.TP 5
78400
79Bad HTTP request; typically this means that you have a malicious program trying to access your server.
80.TP 5
81401
82Unauthorized, authentication (username + password) is required.
83.TP 5
84403
85Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access.
86.TP 5
87404
88The file or resource does not exist.
89.TP 5
90405
91URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
92.TP 5
93413
94Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
95.TP 5
96426
97Upgrading to TLS-encrypted connection.
98.TP 5
99500
100Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
101.TP 5
102501
103The client requested encryption but encryption support is not enabled/compiled in.
104.TP 5
105505
106HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
107.RE
108.LP
109The \fIbytes\fR field contains the number of bytes in the request.
110For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client.
111.LP
112The \fIipp-operation\fR field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
113.LP
114The \fIipp-status\fR field contains either "-" for non-IPP requests or the IPP status code name for POST requests containing an IPP response.
115.SS ERROR LOG FILE FORMAT
116The \fIerror_log\fR file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the
117.BR cupsd.conf (5)
118file controls which messages are logged:
119.nf
120
121 level date-time message
122
123.fi
124For example:
125.nf
126
127 I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'.
128 D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]="DeskJet"
129 D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]="1"
130 D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]="mike"
131 D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]="myjob"
132 D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]="1"
133 D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]="media=
134 na_letter_8.5x11in sides=one-sided"
135 D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]="/var/spool/cups/
136 d000001-001"
137 I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'.
138 I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'.
139
140.fi
141The \fIlevel\fR field contains the type of message:
142.TP 5
143A
144Alert message (LogLevel alert)
145.TP 5
146C
147Critical error message (LogLevel crit)
148.TP 5
149D
150Debugging message (LogLevel debug)
151.TP 5
152d
153Detailed debugging message (LogLevel debug2)
154.TP 5
155E
156Normal error message (LogLevel error)
157.TP 5
158I
159Informational message (LogLevel info)
160.TP 5
161N
162Notice message (LogLevel notice)
163.TP 5
164W
165Warning message (LogLevel warn)
166.TP 5
167X
168Emergency error message (LogLevel emerg)
25d0c3fe 169.LP
bf1bc4c6 170The \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.
25d0c3fe 171.LP
bf1bc4c6
MS
172The \fImessage\fR field contains a free-form textual message.
173Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
174.SS PAGE LOG FILE FORMAT
175The \fIpage_log\fR file lists each page or group of pages that are sent to a printer.
176By default, each line contains the following information:
25d0c3fe
MS
177.nf
178
bf1bc4c6
MS
179 \fIprinter user job-id date-time page-number num-copies job-billing
180 job-originating-host-name job-name media sides\fR
181
182 \fIprinter user job-id date-time \fBtotal \fInum-impressions job-billing
183 job-originating-host-name job-name media sides\fR
184
25d0c3fe 185.fi
bf1bc4c6
MS
186For example the entries for a two page job called "myjob" might look like:
187.nf
188
189 DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
190 localhost myjob na_letter_8.5x11in one-sided
191 DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
192 localhost myjob na_letter_8.5x11in one-sided
193
194 DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
195 localhost myjob na_letter_8.5x11in one-sided
196
197.fi
198The PageLogFormat directive in the
199.BR cupsd.conf (5)
200file can be used to change this information.
201.LP
202The \fIprinter\fR field contains the name of the printer that printed the page.
203If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
204.LP
205The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
206.LP
207The \fIjob-id\fR field contains the job number of the page being printed.
208.LP
209The \fIdate-time\fR field contains the date and time of when the page started printing.
210The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
211.LP
212The \fIpage-number\fR and \fInum-copies\fR fields contain the page number and number of copies being printed of that page.
213For printers that cannot produce copies on their own, the num-copies field will always be 1.
214.LP
215Lines 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.
216.LP
217The \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.
218.LP
219The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
220.LP
221The \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.
25d0c3fe 222.LP
bf1bc4c6 223The \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.
25d0c3fe 224.LP
bf1bc4c6 225The \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.
25d0c3fe 226.SH SEE ALSO
25d0c3fe
MS
227.BR cupsd (8),
228.BR cupsd.conf (5),
bf1bc4c6 229.BR cups-files.conf (5),
25d0c3fe
MS
230CUPS Online Help (http://localhost:631/help)
231.SH COPYRIGHT
bd5a2f28 232Copyright \[co] 2007-2017 by Apple Inc.