]> git.ipfire.org Git - thirdparty/cups.git/blob - man/cupsd-logs.man
Remove all of the Subversion keywords from various source files.
[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 .\" 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/".
12 .\"
13 .TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
14 .SH NAME
15 cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
16 .SH DESCRIPTION
17 .BR cupsd (8)
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
20 .BR cupsd.conf (5)
21 and
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:
27 .nf
28
29 \fIhost group user date-time \fR"\fImethod resource version\fR" \fIstatus bytes
30 ipp-operation ipp-status\fR
31
32 .fi
33 For example:
34 .nf
35
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"
39 200 0 - -
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"
46 200 6667 - -
47
48 .fi
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.
50 .LP
51 The \fIgroup\fR field always contains "-".
52 .LP
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 "-".
55 .LP
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]".
57 .LP
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.
64 .LP
65 The \fIresource\fR field is the filename of the requested resource.
66 .LP
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".
69 .LP
70 The \fIstatus\fR field contains the HTTP result status of the request, as follows:
71 .RS 5
72 .TP 5
73 200
74 Successful operation.
75 .TP 5
76 201
77 File created/modified successfully.
78 .TP 5
79 304
80 The requested file has not changed.
81 .TP 5
82 400
83 Bad HTTP request; typically this means that you have a malicious program trying to access your server.
84 .TP 5
85 401
86 Unauthorized, authentication (username + password) is required.
87 .TP 5
88 403
89 Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access.
90 .TP 5
91 404
92 The file or resource does not exist.
93 .TP 5
94 405
95 URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
96 .TP 5
97 413
98 Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
99 .TP 5
100 426
101 Upgrading to TLS-encrypted connection.
102 .TP 5
103 500
104 Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
105 .TP 5
106 501
107 The client requested encryption but encryption support is not enabled/compiled in.
108 .TP 5
109 505
110 HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
111 .RE
112 .LP
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.
115 .LP
116 The \fIipp-operation\fR field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
117 .LP
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
121 .BR cupsd.conf (5)
122 file controls which messages are logged:
123 .nf
124
125 level date-time message
126
127 .fi
128 For example:
129 .nf
130
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/
140 d000001-001"
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'.
143
144 .fi
145 The \fIlevel\fR field contains the type of message:
146 .TP 5
147 A
148 Alert message (LogLevel alert)
149 .TP 5
150 C
151 Critical error message (LogLevel crit)
152 .TP 5
153 D
154 Debugging message (LogLevel debug)
155 .TP 5
156 d
157 Detailed debugging message (LogLevel debug2)
158 .TP 5
159 E
160 Normal error message (LogLevel error)
161 .TP 5
162 I
163 Informational message (LogLevel info)
164 .TP 5
165 N
166 Notice message (LogLevel notice)
167 .TP 5
168 W
169 Warning message (LogLevel warn)
170 .TP 5
171 X
172 Emergency error message (LogLevel emerg)
173 .LP
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.
175 .LP
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:
181 .nf
182
183 \fIprinter user job-id date-time page-number num-copies job-billing
184 job-originating-host-name job-name media sides\fR
185
186 \fIprinter user job-id date-time \fBtotal \fInum-impressions job-billing
187 job-originating-host-name job-name media sides\fR
188
189 .fi
190 For example the entries for a two page job called "myjob" might look like:
191 .nf
192
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
197
198 DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
199 localhost myjob na_letter_8.5x11in one-sided
200
201 .fi
202 The PageLogFormat directive in the
203 .BR cupsd.conf (5)
204 file can be used to change this information.
205 .LP
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.
208 .LP
209 The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
210 .LP
211 The \fIjob-id\fR field contains the job number of the page being printed.
212 .LP
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.
215 .LP
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.
218 .LP
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.
220 .LP
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.
222 .LP
223 The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
224 .LP
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.
226 .LP
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.
228 .LP
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.
230 .SH SEE ALSO
231 .BR cupsd (8),
232 .BR cupsd.conf (5),
233 .BR cups-files.conf (5),
234 CUPS Online Help (http://localhost:631/help)
235 .SH COPYRIGHT
236 Copyright \[co] 2007-2015 by Apple Inc.