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