]> git.ipfire.org Git - thirdparty/cups.git/blob - man/cupsd-logs.man
Back-port accounting changes from CUPS 2.3 (Issue #5439)
[thirdparty/cups.git] / man / cupsd-logs.man
1 .\"
2 .\" cupsd-logs man page for CUPS.
3 .\"
4 .\" Copyright © 2007-2018 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" "8 November 2017" "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 the total number of pages (sheets) that are printed.
180 By default, each line contains the following information:
181 .nf
182
183 \fIprinter user job-id date-time \fBtotal \fInum-sheets job-billing
184 job-originating-host-name job-name media sides\fR
185
186 .fi
187 For example the entry for a two page job called "myjob" might look like:
188 .nf
189
190 DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
191 localhost myjob na_letter_8.5x11in one-sided
192
193 .fi
194 The PageLogFormat directive in the
195 .BR cupsd.conf (5)
196 file can be used to change this information.
197 .LP
198 The \fIprinter\fR field contains the name of the printer that printed the page.
199 If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
200 .LP
201 The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
202 .LP
203 The \fIjob-id\fR field contains the job number of the page being printed.
204 .LP
205 The \fIdate-time\fR field contains the date and time of when the page started printing.
206 The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
207 .LP
208 The \fInum-sheets\fR field provides the total number of pages (sheets) that have been printed on for the job.
209 .LP
210 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.
211 .LP
212 The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
213 .LP
214 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.
215 .LP
216 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.
217 .LP
218 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.
219 .SH SEE ALSO
220 .BR cupsd (8),
221 .BR cupsd.conf (5),
222 .BR cups-files.conf (5),
223 CUPS Online Help (http://localhost:631/help)
224 .SH COPYRIGHT
225 Copyright \[co] 2007-2018 by Apple Inc.