1pki-server-logging(5) PKI Server Logging Configuration pki-server-logging(5)
2
3
4
6 pki-server-logging - PKI Server Logging Configuration
7
8
10 /etc/pki/instance/logging.properties, /etc/pki/instance/subsys‐
11 tem/CS.cfg
12
13
15 PKI server logging can be configured using the following logging frame‐
16 works:
17
18
19 · java.util.logging ⟨https://docs.ora‐
20 cle.com/javase/8/docs/api/java/util/logging/package-sum‐
21 mary.html⟩
22
23 · Internal Logging
24
25
26
27 java.util.logging
28 Tomcat uses java.util.logging (JUL) as the default logging framework.
29 The configuration is described in Tomcat 7 Logging ⟨http://tom‐
30 cat.apache.org/tomcat-7.0-doc/logging.html⟩ and Tomcat 8 Logging
31 ⟨http://tomcat.apache.org/tomcat-8.0-doc/logging.html⟩.
32
33
34 The default configuration is located at /usr/share/pki/server/conf/log‐
35 ging.properties. During server deployment a link will be created at
36 /etc/pki/instance/logging.properties.
37
38
39 By default only log messages with level WARNING or higher will be
40 logged on the console (i.e. systemd journal).
41
42
43 java.util.logging.ConsoleHandler.level = ALL
44 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
45
46 java.util.logging.SimpleFormatter.format = %4$s: %5$s%6$s%n
47
48
49
50
51 The systemd journal can be viewed with the following command:
52
53
54 $ journalctl -u pki-tomcatd@<instance>.service
55
56
57
58 For more information see the following documents:
59
60
61 · java.util.logging.ConsoleHandler ⟨https://docs.ora‐
62 cle.com/javase/8/docs/api/java/util/logging/ConsoleHan‐
63 dler.html⟩
64
65 · java.util.logging.Level ⟨https://docs.ora‐
66 cle.com/javase/8/docs/api/java/util/logging/Level.html⟩
67
68 · java.util.logging.SimpleFormatter ⟨https://docs.ora‐
69 cle.com/javase/8/docs/api/java/util/logging/SimpleFormat‐
70 ter.html⟩
71
72 · java.util.Formatter ⟨https://docs.ora‐
73 cle.com/javase/8/docs/api/java/util/Formatter.html⟩
74
75
76
77 Internal Logging
78 Each PKI subsystem uses an internal logging framework for debugging
79 purposes.
80
81
82 The logging configuration is stored in /etc/pki/instance/subsys‐
83 tem/CS.cfg.
84
85
86 debug.level=10
87
88
89
90 The debug.level determines the amount of details to be logged. The
91 value ranges from 0 (most details) to 10 (least details). The default
92 is 10.
93
94
96 java.util.logging
97 To customize JUL configuration, replace the link with a copy of the
98 default configuration:
99
100
101 $ rm -f /etc/pki/<instance>/logging.properties
102 $ cp /usr/share/pki/server/conf/logging.properties /etc/pki/<instance>
103 $ chown pkiuser.pkiuser /etc/pki/<instance>/logging.properties
104
105
106
107 Then edit the file as needed. For example, to troubleshoot issues with
108 PKI library add the following lines:
109
110
111 netscape.level = ALL
112 com.netscape.level = ALL
113 org.dogtagpki.level = ALL
114
115
116
117 To troubleshoot issues with RESTEasy add the following line:
118
119
120 org.jboss.resteasy.level = ALL
121
122
123
124 Then restart the server.
125
126
127 Internal Logging
128 To customize the internal logging configuration, edit the CS.cfg as
129 needed, then restart the server.
130
131
133 Dogtag PKI Team <pki-devel@redhat.com>.
134
135
137 pki-logging(5)
138
139
141 Copyright (c) 2016 Red Hat, Inc. This is licensed under the GNU Gen‐
142 eral Public License, version 2 (GPLv2). A copy of this license is
143 available at ⟨http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt⟩.
144
145
146
147PKI November 3, 2016 pki-server-logging(5)