Este contenido no está disponible en el idioma seleccionado.

Chapter 12. 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

  1. Edit the /etc/cups/cups-files.conf file, and set the AccessLog, ErrorLog, and PageLog parameters 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
  2. If you configure CUPS to store the logs in a directory other than /var/log/cups/, set the cupsd_log_t SELinux context on this directory, for example:

    # semanage fcontext -a -t cupsd_log_t "/var/log/printing(/.*)?"
    # restorecon -Rv /var/log/printing/
  3. Restart the cups service:

    # systemctl restart cups

Verification

  1. Display the log files:

    # cat /var/log/cups/access_log
    # cat /var/log/cups/error_log
    # cat /var/log/cups/page_log
  2. 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 is cupsd_log_t:

    # 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/
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2026 Red Hat
Volver arriba