Este conteúdo não está disponível no idioma selecionado.
Chapter 14. Configuring CUPS to store logs in files instead of the systemd journal
By default, CUPS stores log messages in the systemd journal. Alternatively, you can configure CUPS to store log messages in files.
Prerequisites
Procedure
Edit the
/etc/cups/cups-files.conffile, and set theAccessLog,ErrorLog, andPageLogparameters to the paths where you want to store these log files:AccessLog /var/log/cups/access_log ErrorLog /var/log/cups/error_log PageLog /var/log/cups/page_log
AccessLog /var/log/cups/access_log ErrorLog /var/log/cups/error_log PageLog /var/log/cups/page_logCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you configure CUPS to store the logs in a directory other than
/var/log/cups/, set thecupsd_log_tSELinux context on this directory, for example:semanage fcontext -a -t cupsd_log_t "/var/log/printing(/.*)?" restorecon -Rv /var/log/printing/
# semanage fcontext -a -t cupsd_log_t "/var/log/printing(/.*)?" # restorecon -Rv /var/log/printing/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
cupsservice:systemctl restart cups
# systemctl restart cupsCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Display the log files:
cat /var/log/cups/access_log cat /var/log/cups/error_log cat /var/log/cups/page_log
# cat /var/log/cups/access_log # cat /var/log/cups/error_log # cat /var/log/cups/page_logCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you configured CUPS to store the logs in a directory other than
/var/log/cups/, verify that the SELinux context on the log directory iscupsd_log_t:ls -ldZ /var/log/printing/
# ls -ldZ /var/log/printing/ drwxr-xr-x. 2 lp sys unconfined_u:object_r:cupsd_log_t:s0 6 Jun 20 15:55 /var/log/printing/Copy to Clipboard Copied! Toggle word wrap Toggle overflow