@@ -12,9 +12,9 @@ Log4j2 logging framework, via the
12
12
"org.springframework.boot: spring-boot-starter-log4j2 " Maven dependency, in
13
13
preference to the stock Spring Boot "logback" framework.
14
14
15
- ## DSpace Logs
15
+ ## DRUM DSpace Logs
16
16
17
- There are two distinct log configurations:
17
+ There are two distinct log configurations for the DRUM DSpace application :
18
18
19
19
* DSpace application logs
20
20
* Spring Boot embedded Tomcat server access logs
@@ -65,21 +65,26 @@ Kubernetes), do the following:
65
65
66
66
## Kubernetes JSON-formatted Logging
67
67
68
+ ### DRUM - DSpace Logs
69
+
68
70
In Kubernetes, the DSpace application logs are controlled by the
69
71
"overlays/\< NAMESPACE>/log4j2.xml" file (where "\< NAMESPACE>" is the Kubernetes
70
- namespace (i.e., "sandbox", "test", "qa", or "prod").
72
+ namespace (i.e., "sandbox", "test", "qa", or "prod")) .
71
73
72
74
To enable JSON-formatted logging, the Log4j "Appenders" are modified to use
73
75
the "JsonTemplateLayout", i.e.:
74
76
75
77
``` xml
76
78
<Appender name =' A1'
77
- type =' Console'
79
+ ...
80
+ >
81
+ ...
78
82
<JsonTemplateLayout eventTemplateUri =" classpath:EcsLayout.json" />
83
+ ...
79
84
</Appender >
80
85
```
81
86
82
- The JSON-formatted Tomcat access log in enabled by the
87
+ The JSON-formatted Tomcat access log is enabled by the
83
88
"umd.server.tomcat.accesslog.json.enabled" property in the
84
89
"overlays/\< NAMESPACE>/local.cfg" file:
85
90
@@ -94,6 +99,28 @@ server.tomcat.accesslog.file-date-format=
94
99
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D
95
100
```
96
101
102
+ ### DRUM - Solr Logs
103
+
104
+ #### Solr Log4J application logs
105
+
106
+ In Kubernetes, the Solr application logs are controlled by the
107
+ "overlays/\< NAMESPACE>/solr/log4j2.xml" file (where "\< NAMESPACE>" is the
108
+ Kubernetes namespace (i.e., "sandbox", "test", "qa", or "prod").
109
+
110
+ The "log4j2.xml" configures Log4J to use the "JsonTemplateLayout", to
111
+ provide JSON-formatted output to Splunk.
112
+
113
+ #### Solr Java garbage collection logs
114
+
115
+ The command-line options of the JVM used to run Solr is configured by the stock
116
+ "solr" Docker image to log Java garbage collection activity in the
117
+ "/var/solr/logs/solr_gc.log" file. This logging is * not* controlled by Log4J,
118
+ and is not JSON-formatted.
119
+
120
+ The command-line options that generate the "solr_gc.log" specify a rolling log
121
+ with each file limited to 20 megabytes, and a maximum of 10 files, so the
122
+ maximum size of the logs should be 200 megabytes.
123
+
97
124
## DRUM Customizations
98
125
99
126
To enable JSON-formatted logging, the embedded Tomcat server provided by Spring
0 commit comments