.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
.THcupsd-logs5"CUPS""26 April 2019""Apple Inc."
.SHNAME
cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
.SHDESCRIPTION
.BRcupsd(8)
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.
Configuration directives in
.BRcupsd.conf(5)
and
.BRcups-files.conf(5)
control what information is logged and where it is stored.
.SSACCESSLOGFILEFORMAT
The \fIaccess_log\fR file lists each HTTP resource that is accessed by a web browser or client.
Each line is in an extended version of the so-called "Common Log Format" used by many web servers and web reporting tools:
.nf
\fIhost group user date-time \fR"\fImethod resource version\fR" \fIstatus bytes
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.
I [20/May/1999:19:18:28 +0000] [Job 1] Queued on 'DeskJet' by 'mike'.
D [20/May/1999:19:18:28 +0000] [Job 1] argv[0]="DeskJet"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[1]="1"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[2]="mike"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[3]="myjob"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[4]="1"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[5]="media=
na_letter_8.5x11in sides=one-sided"
D [20/May/1999:19:18:28 +0000] [Job 1] argv[6]="/var/spool/cups/
d000001-001"
I [20/May/1999:19:21:02 +0000] [Job 2] Queued on 'DeskJet' by 'mike'.
I [20/May/1999:19:22:24 +0000] [Job 2] Canceled by 'mike'.
.fi
The \fIlevel\fR field contains the type of message:
.TP5
A
Alert message (LogLevel alert)
.TP5
C
Critical error message (LogLevel crit)
.TP5
D
Debugging message (LogLevel debug)
.TP5
d
Detailed debugging message (LogLevel debug2)
.TP5
E
Normal error message (LogLevel error)
.TP5
I
Informational message (LogLevel info)
.TP5
N
Notice message (LogLevel notice)
.TP5
W
Warning message (LogLevel warn)
.TP5
X
Emergency error message (LogLevel emerg)
.LP
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.
.LP
The \fImessage\fR field contains a free-form textual message.
Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
.SSPAGELOGFILEFORMAT
The \fIpage_log\fR file lists the total number of pages (sheets) that are printed.
By default, each line contains the following information:
.nf
\fIprinter user job-id date-time \fBtotal \fInum-sheets job-billing
job-originating-host-name job-name media sides\fR
.fi
For example the entry for a two page job called "myjob" might look like:
.nf
DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
localhost myjob na_letter_8.5x11in one-sided
.fi
The PageLogFormat directive in the
.BRcupsd.conf(5)
file can be used to change this information.
.LP
The \fIprinter\fR field contains the name of the printer that printed the page.
If you send a job to a printer class, this field will contain the name of the printer that was assigned the job.
.LP
The \fIuser\fR field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing.
.LP
The \fIjob-id\fR field contains the job number of the page being printed.
.LP
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.
.LP
The \fInum-sheets\fR field provides the total number of pages (sheets) that have been printed on for the job.
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.
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.
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.