I am having a problem with jdk logging with Solr, using the jetty included with Solr.

In jetty.xml, I have the following defined:
<Call class="java.lang.System" name="setProperty">
<Arg>java.util.logging.config.file</Arg>
<Arg>etc/logging.properties</Arg>
</Call>

Contents of etc/logging.properties:
======
#  Logging level
.level=WARNING

# Write to a file
handlers = java.util.logging.FileHandler

# Write log messages in human readable format:
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHander.formatter = java.util.logging.SimpleFormatter

# Log to the log subdirectory, with log files named solr_log-n.log
java.util.logging.FileHandler.pattern = ./log/solr_log-%g.log
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.count = 10
java.util.logging.FileHandler.limit = 10485760
======

This actually all seems to work perfectly at first. I changed the logging level to INFO in the solr admin, and it still seemed to work. Then at some point it stopped logging to solr_log-0.log and started logging to stderr. My init script for Solr sends that to a file, but there's no log rotation on that file and it is overwritten whenever Solr is restarted.

With the same config, OS version, java version, and everything else I can think of, my test server is still working, but all of my production servers aren't. It does seem to be related to changing the log level to INFO in the gui, but making that change doesn't make it fail right away.

What information can I provide to help troubleshoot this?

Thanks,
Shawn

Reply via email to