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