]> git.ipfire.org Git - thirdparty/cups.git/blame - man/cupsd-logs.5
Greatly simplify the man page handling.
[thirdparty/cups.git] / man / cupsd-logs.5
CommitLineData
25d0c3fe 1.\"
bf1bc4c6 2.\" cupsd-logs man page for CUPS.
25d0c3fe 3.\"
87030afb
MS
4.\" Copyright © 2007-2019 by Apple Inc.
5.\" Copyright © 1997-2006 by Easy Software Products.
25d0c3fe 6.\"
3d468ced
MS
7.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
8.\" information.
25d0c3fe 9.\"
87030afb 10.TH cupsd-logs 5 "CUPS" "26 April 2019" "Apple Inc."
25d0c3fe 11.SH NAME
bf1bc4c6 12cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
25d0c3fe 13.SH DESCRIPTION
bf1bc4c6
MS
14.BR cupsd (8)
15normally 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.
16Configuration directives in
17.BR cupsd.conf (5)
18and
19.BR cups-files.conf (5)
20control what information is logged and where it is stored.
21.SS ACCESS LOG FILE FORMAT
22The \fIaccess_log\fR file lists each HTTP resource that is accessed by a web browser or client.
23Each 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
30For 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
46The \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
48The \fIgroup\fR field always contains "-".
49.LP
50The \fIuser\fR field is the authenticated username of the requesting user.
51If no username and password is supplied for the request then this field contains "-".
52.LP
53The \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
55The \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
62The \fIresource\fR field is the filename of the requested resource.
63.LP
64The \fIversion\fR field is the HTTP specification version used by the client.
65For CUPS clients this will always be "HTTP/1.1".
66.LP
67The \fIstatus\fR field contains the HTTP result status of the request, as follows:
68.RS 5
69.TP 5
70200
71Successful operation.
72.TP 5
73201
74File created/modified successfully.
75.TP 5
76304
77The requested file has not changed.
78.TP 5
79400
80Bad HTTP request; typically this means that you have a malicious program trying to access your server.
81.TP 5
82401
83Unauthorized, authentication (username + password) is required.
84.TP 5
85403
86Access 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
88404
89The file or resource does not exist.
90.TP 5
91405
92URL access method is not allowed; typically this means you have a web browser using your server as a proxy.
93.TP 5
94413
95Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows.
96.TP 5
97426
98Upgrading to TLS-encrypted connection.
99.TP 5
100500
101Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details.
102.TP 5
103501
104The client requested encryption but encryption support is not enabled/compiled in.
105.TP 5
106505
107HTTP version number not supported; typically this means that you have a malicious program trying to access your server.
108.RE
109.LP
110The \fIbytes\fR field contains the number of bytes in the request.
111For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client.
112.LP
113The \fIipp-operation\fR field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request.
114.LP
115The \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
117The \fIerror_log\fR file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the
118.BR cupsd.conf (5)
119file controls which messages are logged:
120.nf
121
122 level date-time message
123
124.fi
125For 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
142The \fIlevel\fR field contains the type of message:
143.TP 5
144A
145Alert message (LogLevel alert)
146.TP 5
147C
148Critical error message (LogLevel crit)
149.TP 5
150D
151Debugging message (LogLevel debug)
152.TP 5
153d
154Detailed debugging message (LogLevel debug2)
155.TP 5
156E
157Normal error message (LogLevel error)
158.TP 5
159I
160Informational message (LogLevel info)
161.TP 5
162N
163Notice message (LogLevel notice)
164.TP 5
165W
166Warning message (LogLevel warn)
167.TP 5
168X
169Emergency error message (LogLevel emerg)
25d0c3fe 170.LP
bf1bc4c6 171The \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 172.LP
bf1bc4c6
MS
173The \fImessage\fR field contains a free-form textual message.
174Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
175.SS PAGE LOG FILE FORMAT
3d468ced 176The \fIpage_log\fR file lists the total number of pages (sheets) that are printed.
bf1bc4c6 177By default, each line contains the following information:
25d0c3fe
MS
178.nf
179
3d468ced 180 \fIprinter user job-id date-time \fBtotal \fInum-sheets job-billing
bf1bc4c6
MS
181 job-originating-host-name job-name media sides\fR
182
25d0c3fe 183.fi
3d468ced 184For example the entry for a two page job called "myjob" might look like:
bf1bc4c6
MS
185.nf
186
bf1bc4c6
MS
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
191The PageLogFormat directive in the
192.BR cupsd.conf (5)
193file can be used to change this information.
194.LP
195The \fIprinter\fR field contains the name of the printer that printed the page.
196If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
197.LP
198The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
199.LP
200The \fIjob-id\fR field contains the job number of the page being printed.
201.LP
202The \fIdate-time\fR field contains the date and time of when the page started printing.
203The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
204.LP
3d468ced 205The \fInum-sheets\fR field provides the total number of pages (sheets) that have been printed on for the job.
bf1bc4c6
MS
206.LP
207The \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
209The \fIjob-originating-host-name\fR field contains the hostname or IP address of the client that printed the job.
210.LP
211The \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 212.LP
bf1bc4c6 213The \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 214.LP
bf1bc4c6 215The \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 216.SH SEE ALSO
25d0c3fe
MS
217.BR cupsd (8),
218.BR cupsd.conf (5),
bf1bc4c6 219.BR cups-files.conf (5),
25d0c3fe
MS
220CUPS Online Help (http://localhost:631/help)
221.SH COPYRIGHT
87030afb 222Copyright \[co] 2007-2019 by Apple Inc.