Skip to content

Commit 15b22dc

Browse files
committed
LIBDRUM-900. Added information about Solr logging to "DrumLogging.md"
Reorganized the "dspace/docs/DrumLogging.md" document and added information about Solr logging in Kubernetes. https://umd-dit.atlassian.net/browse/LIBDRUM-900
1 parent a4f0ea6 commit 15b22dc

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

dspace/docs/DrumLogging.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Log4j2 logging framework, via the
1212
"org.springframework.boot:spring-boot-starter-log4j2" Maven dependency, in
1313
preference to the stock Spring Boot "logback" framework.
1414

15-
## DSpace Logs
15+
## DRUM DSpace Logs
1616

17-
There are two distinct log configurations:
17+
There are two distinct log configurations for the DRUM DSpace application:
1818

1919
* DSpace application logs
2020
* Spring Boot embedded Tomcat server access logs
@@ -65,21 +65,26 @@ Kubernetes), do the following:
6565

6666
## Kubernetes JSON-formatted Logging
6767

68+
### DRUM - DSpace Logs
69+
6870
In Kubernetes, the DSpace application logs are controlled by the
6971
"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")).
7173

7274
To enable JSON-formatted logging, the Log4j "Appenders" are modified to use
7375
the "JsonTemplateLayout", i.e.:
7476

7577
```xml
7678
<Appender name='A1'
77-
type='Console'
79+
...
80+
>
81+
...
7882
<JsonTemplateLayout eventTemplateUri="classpath:EcsLayout.json" />
83+
...
7984
</Appender>
8085
```
8186

82-
The JSON-formatted Tomcat access log in enabled by the
87+
The JSON-formatted Tomcat access log is enabled by the
8388
"umd.server.tomcat.accesslog.json.enabled" property in the
8489
"overlays/\<NAMESPACE>/local.cfg" file:
8590

@@ -94,6 +99,28 @@ server.tomcat.accesslog.file-date-format=
9499
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D
95100
```
96101

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+
97124
## DRUM Customizations
98125

99126
To enable JSON-formatted logging, the embedded Tomcat server provided by Spring

0 commit comments

Comments
 (0)