The server logging.properties has been modified to log low level messages into catalina log for troubleshooting non-PKI issues (e.g. RESTEasy). High level messages (i.e. errors and warnings) will continue to be logged on the console.
The pki-server-logging man page has been updated accordingly. https://fedorahosted.org/pki/ticket/195 -- Endi S. Dewata
>From 71425b73f2f04a4d7c53b4d7be294e4b83a149b1 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" <edew...@redhat.com> Date: Sat, 19 Nov 2016 00:26:25 +0100 Subject: [PATCH] Updated server logging.properties. The server logging.properties has been modified to log low level messages into catalina log for troubleshooting non-PKI issues (e.g. RESTEasy). High level messages (i.e. errors and warnings) will continue to be logged on the console. The pki-server-logging man page has been updated accordingly. https://fedorahosted.org/pki/ticket/195 --- base/common/man/man5/pki-logging.5 | 3 ++- base/server/man/man5/pki-server-logging.5 | 17 +++++++++++++---- base/server/share/conf/logging.properties | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/base/common/man/man5/pki-logging.5 b/base/common/man/man5/pki-logging.5 index ab3740280902fd43a26a3d1597685f16ddc08f13..2cea0ece7fbe54dff56012cd356e929b77c471ab 100644 --- a/base/common/man/man5/pki-logging.5 +++ b/base/common/man/man5/pki-logging.5 @@ -27,7 +27,8 @@ PKI clients and tools use java.util.logging (JUL) as the logging framework The default logging configuration is located at /usr/share/pki/etc/logging.properties. -By default only log messages with level WARNING or higher will be logged on the console. +By default only high level messages (e.g. errors and warnings) will be logged on the console. +Low level messages can be enabled for troubleshooting (see Customization). .IP .nf diff --git a/base/server/man/man5/pki-server-logging.5 b/base/server/man/man5/pki-server-logging.5 index 9aed7d83d28d1025d775506c40426c895a0782ec..c2467041085bf27534cb34bb1b6b3cd68dd090e4 100644 --- a/base/server/man/man5/pki-server-logging.5 +++ b/base/server/man/man5/pki-server-logging.5 @@ -38,16 +38,22 @@ The configuration is described in http://tomcat.apache.org/tomcat-7.0-doc/loggin The default configuration is located at /usr/share/pki/server/conf/logging.properties. During server deployment a link will be created at /etc/pki/<instance>/logging.properties. -By default only log messages with level WARNING or higher will be logged on the console (i.e. systemd journal). +By default only high level messages (i.e. errors and warnings) will be logged on the console (i.e. systemd journal). +Low level messages can be enabled for troubleshooting (see Customization), and they will be logged into the catalina log file. +Generally the admin will only need to watch the console, and only use catalina log for troubleshooting. .IP .nf -java.util.logging.ConsoleHandler.level = ALL +1catalina.org.apache.juli.FileHandler.level = FINE +1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.FileHandler.prefix = catalina. + +java.util.logging.ConsoleHandler.level = WARNING java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n \[char46]level = WARNING -\[char46]handlers = java.util.logging.ConsoleHandler +\[char46]handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .fi .PP @@ -57,6 +63,8 @@ The systemd journal can be viewed with the following command: $ journalctl -u pki-tomcatd@<instance>.service .fi +The catalina log file is located at /var/log/pki/<instance>/catalina.YYYY-MM-DD.log. + For more information see the following documents: .nf @@ -74,7 +82,8 @@ However, since the Log4j is in the classpath the RESTEasy will use Log4j for log The default Log4j configuration is located at /usr/share/pki/server/conf/log4j.properties. During server deployment a link will be created at /var/lib/pki/<instance>/lib/log4j.properties. -By default only log messages with level WARN or higher will be logged on the console (i.e. systemd journal). +By default only high level messages (i.e. errors and warnings) will be logged on the console (i.e. systemd journal). +Low level messages can be enabled for troubleshooting (see Customization). .IP .nf diff --git a/base/server/share/conf/logging.properties b/base/server/share/conf/logging.properties index 7c1ac37ec300375c96c0d415856622a429235b7f..866a4a276c3518583dcde65f2effe007fb00d280 100644 --- a/base/server/share/conf/logging.properties +++ b/base/server/share/conf/logging.properties @@ -42,7 +42,7 @@ handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.Fil 4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 4host-manager.org.apache.juli.FileHandler.prefix = host-manager. -java.util.logging.ConsoleHandler.level = ALL +java.util.logging.ConsoleHandler.level = WARNING java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n @@ -52,7 +52,7 @@ java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n ############################################################ .level = WARNING -.handlers = java.util.logging.ConsoleHandler +.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler -- 2.5.5
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel