1<!DOCTYPE HTML> 2<html> 3<!-- SECTION: Man Pages --> 4<head> 5 <link rel="stylesheet" type="text/css" href="../cups-printable.css"> 6 <title>cupsd-logs(5)</title> 7</head> 8<body> 9<h1 class="title">cupsd-logs(5)</h1> 10<h2 class="title"><a name="NAME">Name</a></h2> 11cupsd-logs - cupsd log files (access_log, error_log, and page_log) 12<h2 class="title"><a name="DESCRIPTION">Description</a></h2> 13<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8)</a> 14normally maintains three log files: <i>access_log</i> to track requests that are submitted to the scheduler, <i>error_log</i> to track progress and errors, and <i>page_log</i> to track pages that are printed. 15Configuration directives in 16<a href="man-cupsd.conf.html?TOPIC=Man+Pages"><b>cupsd.conf</b>(5)</a> 17and 18<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5)</a> 19control what information is logged and where it is stored. 20<h3><a name="ACCESS_LOG_FILE_FORMAT">Access Log File Format</a></h3> 21The <i>access_log</i> file lists each HTTP resource that is accessed by a web browser or client. 22Each line is in an extended version of the so-called "Common Log Format" used by many web servers and web reporting tools: 23<pre class="man"> 24 <i>host group user date-time </i>"<i>method resource version</i>" <i>status bytes 25 ipp-operation ipp-status</i> 26 27</pre> 28For example: 29<pre class="man"> 30 10.0.1.2 - - [01/Dec/2005:21:50:28 +0000] "POST / HTTP/1.1" 200 317 31 CUPS-Get-Printers successful-ok-ignored-or-substituted-attributes 32 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1" 33 200 0 - - 34 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1" 35 200 157 CUPS-Get-Printers 36 successful-ok-ignored-or-substituted-attributes 37 localhost - - [01/Dec/2005:21:50:32 +0000] "POST / HTTP/1.1" 38 200 1411 CUPS-Get-Devices - 39 localhost - - [01/Dec/2005:21:50:32 +0000] "GET /admin HTTP/1.1" 40 200 6667 - - 41 42</pre> 43The <i>host</i> field will normally only be an IP address unless you have enabled the HostNameLookups directive in the <i>cupsd.conf</i> file or if the IP address corresponds to your local machine. 44<p>The <i>group</i> field always contains "-". 45<p>The <i>user</i> field is the authenticated username of the requesting user. 46If no username and password is supplied for the request then this field contains "-". 47<p>The <i>date-time</i> field is the date and time of the request in local time and is in the format "[DD/MON/YYYY:HH:MM:SS +ZZZZ]". 48<p>The <i>method</i> field is the HTTP method used: "GET", "HEAD", "OPTIONS", "POST", or "PUT". 49"GET" requests are used to get files from the server, both for the web interface and to get configuration and log files. 50"HEAD" requests are used to get information about a resource prior to a "GET". 51"OPTIONS" requests are used to upgrade connections to TLS encryption. 52"POST" requests are used for web interface forms and IPP requests. 53"PUT" requests are used to upload configuration files. 54<p>The <i>resource</i> field is the filename of the requested resource. 55<p>The <i>version</i> field is the HTTP specification version used by the client. 56For CUPS clients this will always be "HTTP/1.1". 57<p>The <i>status</i> field contains the HTTP result status of the request, as follows: 58<div style="margin-left: 5.0em;"> 59<dl class="man"> 60<dt>200 61<dd style="margin-left: 5.0em">Successful operation. 62<dt>201 63<dd style="margin-left: 5.0em">File created/modified successfully. 64<dt>304 65<dd style="margin-left: 5.0em">The requested file has not changed. 66<dt>400 67<dd style="margin-left: 5.0em">Bad HTTP request; typically this means that you have a malicious program trying to access your server. 68<dt>401 69<dd style="margin-left: 5.0em">Unauthorized, authentication (username + password) is required. 70<dt>403 71<dd style="margin-left: 5.0em">Access is forbidden; typically this means that a client tried to access a file or resource they do not have permission to access. 72<dt>404 73<dd style="margin-left: 5.0em">The file or resource does not exist. 74<dt>405 75<dd style="margin-left: 5.0em">URL access method is not allowed; typically this means you have a web browser using your server as a proxy. 76<dt>413 77<dd style="margin-left: 5.0em">Request too large; typically this means that a client tried to print a file larger than the MaxRequestSize allows. 78<dt>426 79<dd style="margin-left: 5.0em">Upgrading to TLS-encrypted connection. 80<dt>500 81<dd style="margin-left: 5.0em">Server error; typically this happens when the server is unable to open/create a file - consult the error_log file for details. 82<dt>501 83<dd style="margin-left: 5.0em">The client requested encryption but encryption support is not enabled/compiled in. 84<dt>505 85<dd style="margin-left: 5.0em">HTTP version number not supported; typically this means that you have a malicious program trying to access your server. 86</div> 87</dl> 88<p>The <i>bytes</i> field contains the number of bytes in the request. 89For POST requests the bytes field contains the number of bytes of non-IPP data that is received from the client. 90<p>The <i>ipp-operation</i> field contains either "-" for non-IPP requests or the IPP operation name for POST requests containing an IPP request. 91<p>The <i>ipp-status</i> field contains either "-" for non-IPP requests or the IPP status code name for POST requests containing an IPP response. 92<h3><a name="ERROR_LOG_FILE_FORMAT">Error Log File Format</a></h3> 93The <i>error_log</i> file lists messages from the scheduler - errors, warnings, etc. The LogLevel directive in the 94<a href="man-cupsd.conf.html?TOPIC=Man+Pages"><b>cupsd.conf</b>(5)</a> 95file controls which messages are logged: 96<pre class="man"> 97 level date-time message 98 99</pre> 100For example: 101<pre class="man"> 102 I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'. 103 D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]="DeskJet" 104 D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]="1" 105 D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]="mike" 106 D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]="myjob" 107 D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]="1" 108 D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]="media= 109 na_letter_8.5x11in sides=one-sided" 110 D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]="/var/spool/cups/ 111 d000001-001" 112 I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'. 113 I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'. 114 115</pre> 116The <i>level</i> field contains the type of message: 117<dl class="man"> 118<dt>A 119<dd style="margin-left: 5.0em">Alert message (LogLevel alert) 120<dt>C 121<dd style="margin-left: 5.0em">Critical error message (LogLevel crit) 122<dt>D 123<dd style="margin-left: 5.0em">Debugging message (LogLevel debug) 124<dt>d 125<dd style="margin-left: 5.0em">Detailed debugging message (LogLevel debug2) 126<dt>E 127<dd style="margin-left: 5.0em">Normal error message (LogLevel error) 128<dt>I 129<dd style="margin-left: 5.0em">Informational message (LogLevel info) 130<dt>N 131<dd style="margin-left: 5.0em">Notice message (LogLevel notice) 132<dt>W 133<dd style="margin-left: 5.0em">Warning message (LogLevel warn) 134<dt>X 135<dd style="margin-left: 5.0em">Emergency error message (LogLevel emerg) 136</dl> 137<p>The <i>date-time</i> 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 <i>access_log</i> file. 138<p>The <i>message</i> field contains a free-form textual message. 139Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID. 140<h3><a name="PAGE_LOG_FILE_FORMAT">Page Log File Format</a></h3> 141The <i>page_log</i> file lists the total number of pages (sheets) that are printed. 142By default, each line contains the following information: 143<pre class="man"> 144 <i>printer user job-id date-time </i><b>total </b><i>num-sheets job-billing 145 job-originating-host-name job-name media sides</i> 146 147</pre> 148For example the entry for a two page job called "myjob" might look like: 149<pre class="man"> 150 DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123 151 localhost myjob na_letter_8.5x11in one-sided 152 153</pre> 154The PageLogFormat directive in the 155<a href="man-cupsd.conf.html?TOPIC=Man+Pages"><b>cupsd.conf</b>(5)</a> 156file can be used to change this information. 157<p>The <i>printer</i> field contains the name of the printer that printed the page. 158If you send a job to a printer class, this field will contain the name of the printer that was assigned the job. 159<p>The <i>user</i> field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing. 160<p>The <i>job-id</i> field contains the job number of the page being printed. 161<p>The <i>date-time</i> field contains the date and time of when the page started printing. 162The format of this field is identical to the data-time field in the <i>access_log</i> file. 163<p>The <i>num-sheets</i> field provides the total number of pages (sheets) that have been printed on for the job. 164<p>The <i>job-billing</i> 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. 165<p>The <i>job-originating-host-name</i> field contains the hostname or IP address of the client that printed the job. 166<p>The <i>job-name</i> field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided. 167<p>The <i>media</i> 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. 168<p>The <i>sides</i> field contains a copy of the sides attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided. 169<h2 class="title"><a name="SEE_ALSO">See Also</a></h2> 170<a href="man-cupsd.html?TOPIC=Man+Pages"><b>cupsd</b>(8),</a> 171<a href="man-cupsd.conf.html?TOPIC=Man+Pages"><b>cupsd.conf</b>(5),</a> 172<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5),</a> 173CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>) 174<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2> 175Copyright © 2020-2024 by OpenPrinting. 176 177</body> 178</html> 179