0

I just upgraded Solr to version 7.4.0. The process I followed was:

  • Unzipping the solr-7.4.0.tgz file to /opt/
  • Pointing the 'solr' symlink from the old version to the new version within /opt/
  • Restarting Solr

Since the restart, my log files aren't being updated: enter image description here

Checked my log4j.properties file that's in /var/solr, and nothing has changed: enter image description here

My solr.in.sh settings: enter image description here

As far as I can tell everything is pointing to the right location.

Why aren't my logs being updated, and how do I rectify it?

Logue1021
  • 54
  • 8

2 Answers2

0

From the CHANGES.TXT file for Solr 7.4.0:

SOLR-7887: Solr now uses Log4J 2.11 . The log4j configuration is now in log4j2.xml rather than log4j.properties files. This is a server side change only and clients using SolrJ won't need any changes. Clients can still use any logging implementation which is compatible with SLF4J. We now let log4j2 handle rotation of solr logs at startup, and bin/solr start scripts will no longer attempt this nor move existing console or GC logs into logs/archived either (SOLR-12144).

While I'm not very familiar with the log4j2.xml format, the documentation for the appenders have examples that can be helpful for understanding how the new layout works, but I'm fond of the answer given in Very simple log4j2 XML configuration file using Console and File appender .

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
0

You might need to specify path to log4j2.xml file.

-Dlog4j.configurationFile=<PATH>/log4j2.xml

Works for me. Customize file to your needs.

SamSK
  • 1