Guide - SIS Solr Logging

1 Introduction

This describes samples for configuring logging in the different possible solr deployments for development.

Production setups may need additional considerations.

2 Solr on External Tomcat

Installed a plain tomcat and added the deployed the solr webapp on it.

2.1 Tomcat Global Logging Configuration

There is a configuration file that configures the overall tomcat logging.

  1. Add a file handler to create a solr.*.log file to log solr log messages.
  2. Add 5solr.org.apache.juli.FileHandler to handlers. define the 5solr.org.apache.juli.FileHandler.* log properties add level and handler to log:

    logging.properties
    handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, \
               3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, \
               java.util.logging.ConsoleHandler, 5solr.org.apache.juli.FileHandler
    
    5solr.org.apache.juli.FileHandler.level = FINE
    5solr.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    5solr.org.apache.juli.FileHandler.prefix = solr.
    
    org.apache.solr.level = INFO
    org.apache.solr.handlers=5solr.org.apache.juli.FileHandler
    

Apache Tomcat Logging: http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Java_logging_API_%E2%80%94_java.util.logging

2.2 Solr Webapp Logging Configuration

  1. Place a logging.properties into WEB-INF/classes:

    logging.properties
    handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
    org.apache.juli.FileHandler.level = FINE
    org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    org.apache.juli.FileHandler.prefix = solr.
    
    java.util.logging.ConsoleHandler.level = FINE
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    

3 Internal IS Tomcat

E.g., when adding a context file to:

\engine\tomcat\servers\appserver0\conf\Catalina\localhost

or
copying the solr.war to:

\engine\tomcat\servers\appserver0\webapps

Note

Only recommended for development.

The Intershop logging framework provides an adapter to catch all javalogging (specified in share/system/config/cluster/logging.properties with the intershop.logging.javaloggingadapter.enable)
By default the INFO level is logged nowhere. To enable INFO logging for the solr log messages, e.g., to log it into console add org.apache.solr to TraceConsole appender via SMC or add:

intershop.logging.appender.TraceConsole.categories=org.apache.solr

To share/system/config/cluster/logging.properties

To create a log file for the solr log messages:

  1. Upload the logback-solr.xml in the SMC in Advanced Logging Settings or
  2. Copy the logback-solr.xml to share/systemconfig/cluster/loggingextension and add the line:

    intershop.logging.additionalfiles.cluster=logback-solr.xml
    

To share/system/config/cluster/logging.properties

This creates a log file in \share\system\log\solr-127.0.0.1-ES1-appserver0.log with all log messages that origin from org.apache.solr.

See also: Concept - Logging (valid to 7.3)

4 Jetty

When using the startup from the solr distribution (It is a jetty servlet container delivered in the solr distribution).

See: http://wiki.apache.org/solr/SolrJetty#Logging

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets