]> git.ipfire.org Git - thirdparty/cups.git/blob - man/cupsd-logs.man
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / man / cupsd-logs.man
1 .\"
2 .\" cupsd-logs man page for CUPS.
3 .\"
4 .\" Copyright 2007-2014 by Apple Inc.
5 .\" Copyright 1997-2006 by Easy Software Products.
6 .\"
7 .\" Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 .\"
9 .TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
10 .SH NAME
11 cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
12 .SH DESCRIPTION
13 .BR cupsd (8)
14 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.
15 Configuration directives in
16 .BR cupsd.conf (5)
17 and
18 .BR cups-files.conf (5)
19 control what information is logged and where it is stored.
20 .SS ACCESS LOG FILE FORMAT
21 The \fIaccess_log\fR file lists each HTTP resource that is accessed by a web browser or client.
22 Each 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
29 For 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
45 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.
46 .LP
47 The \fIgroup\fR field always contains "-".
48 .LP
49 The \fIuser\fR field is the authenticated username of the requesting user.
50 If no username and password is supplied for the request then this field contains "-".
51 .LP
52 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]".
53 .LP
54 The \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
61 The \fIresource\fR field is the filename of the requested resource.
62 .LP
63 The \fIversion\fR field is the HTTP specification version used by the client.
64 For CUPS clients this will always be "HTTP/1.1".
65 .LP
66 The \fIstatus\fR field contains the HTTP result status of the request, as follows:
67 .RS 5
68 .TP 5
69 200
70 Successful operation.
71 .TP 5
72 201
73 File created/modified successfully.
74 .TP 5
75 304
76 The requested file has not changed.
77 .TP 5
78 400
79 Bad HTTP request; typically this means that you have a malicious program trying to access your server.
80 .TP 5
81 401
82 Unauthorized, authentication (username + password) is required.
83 .TP 5
84 403
85 Access 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
87 404
88 The file or resource does not exist.
89 .TP 5
90 405
91 URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
92 .TP 5
93 413
94 Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
95 .TP 5
96 426
97 Upgrading to TLS-encrypted connection.
98 .TP 5
99 500
100 Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
101 .TP 5
102 501
103 The client requested encryption but encryption support is not enabled/compiled in.
104 .TP 5
105 505
106 HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
107 .RE
108 .LP
109 The \fIbytes\fR field contains the number of bytes in the request.
110 For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client.
111 .LP
112 The \fIipp-operation\fR field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
113 .LP
114 The \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
116 The \fIerror_log\fR file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the
117 .BR cupsd.conf (5)
118 file controls which messages are logged:
119 .nf
120
121 level date-time message
122
123 .fi
124 For 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
141 The \fIlevel\fR field contains the type of message:
142 .TP 5
143 A
144 Alert message (LogLevel alert)
145 .TP 5
146 C
147 Critical error message (LogLevel crit)
148 .TP 5
149 D
150 Debugging message (LogLevel debug)
151 .TP 5
152 d
153 Detailed debugging message (LogLevel debug2)
154 .TP 5
155 E
156 Normal error message (LogLevel error)
157 .TP 5
158 I
159 Informational message (LogLevel info)
160 .TP 5
161 N
162 Notice message (LogLevel notice)
163 .TP 5
164 W
165 Warning message (LogLevel warn)
166 .TP 5
167 X
168 Emergency error message (LogLevel emerg)
169 .LP
170 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.
171 .LP
172 The \fImessage\fR field contains a free-form textual message.
173 Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
174 .SS PAGE LOG FILE FORMAT
175 The \fIpage_log\fR file lists each page or group of pages that are sent to a printer.
176 By default, each line contains the following information:
177 .nf
178
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
185 .fi
186 For 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
198 The PageLogFormat directive in the
199 .BR cupsd.conf (5)
200 file can be used to change this information.
201 .LP
202 The \fIprinter\fR field contains the name of the printer that printed the page.
203 If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
204 .LP
205 The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
206 .LP
207 The \fIjob-id\fR field contains the job number of the page being printed.
208 .LP
209 The \fIdate-time\fR field contains the date and time of when the page started printing.
210 The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
211 .LP
212 The \fIpage-number\fR and \fInum-copies\fR fields contain the page number and number of copies being printed of that page.
213 For printers that cannot produce copies on their own, the num-copies field will always be 1.
214 .LP
215 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.
216 .LP
217 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.
218 .LP
219 The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
220 .LP
221 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.
222 .LP
223 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.
224 .LP
225 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.
226 .SH SEE ALSO
227 .BR cupsd (8),
228 .BR cupsd.conf (5),
229 .BR cups-files.conf (5),
230 CUPS Online Help (http://localhost:631/help)
231 .SH COPYRIGHT
232 Copyright \[co] 2007-2017 by Apple Inc.