This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new f784a9e SOLR-15610: mention JsonTemplateLayout as a log4j option in
ref-guide
f784a9e is described below
commit f784a9e5738bcc24b68e295f06efadd836bf17d9
Author: Chris Hostetter <[email protected]>
AuthorDate: Tue Sep 7 10:18:20 2021 -0700
SOLR-15610: mention JsonTemplateLayout as a log4j option in ref-guide
---
solr/solr-ref-guide/src/configuring-logging.adoc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/solr/solr-ref-guide/src/configuring-logging.adoc
b/solr/solr-ref-guide/src/configuring-logging.adoc
index 2df8611..1acaa39 100644
--- a/solr/solr-ref-guide/src/configuring-logging.adoc
+++ b/solr/solr-ref-guide/src/configuring-logging.adoc
@@ -105,7 +105,9 @@ bin/solr start -f -q
Solr uses http://logging.apache.org/log4j/2.x/[Log4J version
{ivy-log4j-version}] for logging which is configured using
`server/resources/log4j2.xml`.
Take a moment to inspect the contents of the `log4j2.xml` file so that you are
familiar with its structure.
+
By default, Solr log messages will be written to `SOLR_LOGS_DIR/solr.log`.
+The format of the log messages can be changed by
https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout[modifying
the pattern] used in the `<PatternLayout/>`, or by changing the layout
implementation -- e.g., a
https://logging.apache.org/log4j/2.x/manual/json-template-layout.html[`<JsonTemplateLayout/>`]
can be used to configure JSON formatted log files.
When you're ready to deploy Solr in production, set the variable
`SOLR_LOGS_DIR` to the location where you want Solr to write log files, such as
`/var/solr/logs`.
You may also want to tweak `log4j2.xml`.