.nh .TH pki-server-logging 5 "November 3, 2016" PKI "PKI Server Logging Configuration" .SH NAME .PP pki-server-logging - PKI Server Logging Configuration .SH LOCATION .PP /etc/pki/\fIinstance\fP/logging.properties, /etc/pki/\fIinstance\fP/\fIsubsystem\fP/CS.cfg .SH DESCRIPTION .PP PKI server logging can be configured using the following logging frameworks: .RS .IP \(bu 2 java.util.logging \[la]https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html\[ra] .IP \(bu 2 Internal Logging .RE .SS java.util.logging .PP Tomcat uses java.util.logging (JUL) as the default logging framework. The configuration is described in Tomcat Logging \[la]http://tomcat.apache.org/tomcat-9.0-doc/logging.html\[ra]\&. .PP The default configuration is located at /usr/share/pki/server/conf/logging.properties. During server deployment a link will be created at /etc/pki/\fIinstance\fP/logging.properties. .PP By default only log messages with level WARNING or higher will be logged on the console (i.e. systemd journal). .PP .RS .nf java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n .level = WARNING .handlers = java.util.logging.ConsoleHandler .fi .RE .PP The systemd journal can be viewed with the following command: .PP .RS .nf $ journalctl -u pki-tomcatd@.service .fi .RE .PP For more information see the following documents: .RS .IP \(bu 2 java.util.logging.ConsoleHandler \[la]https://docs.oracle.com/javase/8/docs/api/java/util/logging/ConsoleHandler.html\[ra] .IP \(bu 2 java.util.logging.Level \[la]https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html\[ra] .IP \(bu 2 java.util.logging.SimpleFormatter \[la]https://docs.oracle.com/javase/8/docs/api/java/util/logging/SimpleFormatter.html\[ra] .IP \(bu 2 java.util.Formatter \[la]https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html\[ra] .RE .SS Internal Logging .PP Each PKI subsystem uses an internal logging framework for debugging purposes. .PP The logging configuration is stored in /etc/pki/\fIinstance\fP/\fIsubsystem\fP/CS.cfg. .PP .RS .nf debug.level=10 .fi .RE .PP The \fBdebug.level\fP determines the amount of details to be logged. The value ranges from 0 (most details) to 10 (least details). The default value is 10. .SH CUSTOMIZATION .SS java.util.logging .PP To customize JUL configuration, replace the link with a copy of the default configuration: .PP .RS .nf $ rm -f /etc/pki//logging.properties $ cp /usr/share/pki/server/conf/logging.properties /etc/pki/ $ chown pkiuser.pkiuser /etc/pki//logging.properties .fi .RE .PP Then edit the file as needed. For example, to troubleshoot issues with PKI library add the following lines: .PP .RS .nf netscape.level = ALL com.netscape.level = ALL org.dogtagpki.level = ALL .fi .RE .PP To troubleshoot issues with RESTEasy add the following line: .PP .RS .nf org.jboss.resteasy.level = ALL .fi .RE .PP Then restart the server. .SS Internal Logging .PP To customize the internal logging configuration, edit the CS.cfg as needed, then restart the server. .SH AUTHORS .PP Dogtag PKI Team <devel@lists.dogtagpki.org>\&. .SH SEE ALSO .PP \fBpki-logging(5)\fP .SH COPYRIGHT .PP Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.