Hi, thanks. I looked at these sites, and also the info about "java logging": 
http://java.sun.com/j2se/1.5.0/docs/guide/logging/overview.html

But I couldn't really follow the info about configuration for logging.

The user manual for SLF4J tells you how to call the log methods - but not how 
to actually configure it to write to a file: http://www.slf4j.org/manual.html

As I understand it, solr 1.4 out-of-the-box uses SLF4J, which by default uses 
"java logging". Can you direct me to the info which tells how to configure 
this? So I can for example tell it to log all "INFO" log for a particular class 
to a particular file?

For example, at the moment, when I start up the Solr example, I can see the 
logging written to the console window. I can even see log statements from my 
own classes here.
But when I try to have the log written to a file, I don't see any of my stuff 
any more.

As far as I could find out I just need to make a "logging.properties" file?

# Default global logging level:
.level= ALL

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

# Write log messages in XML format:
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter 

# Log to the current working directory, with log files named solrxxx.log
java.util.logging.FileHandler.pattern = ./solr%u.log

And here I can see lots of log stuff... but not my own, so something's not 
right.

Thanks,
Peter

________________________________________
From: Chris Hostetter [hossman_luc...@fucit.org]
Sent: Wednesday, 24 February 2010 8:36 a.m.
To: solr-user@lucene.apache.org
Subject: Re: logging

: in the Solr example, how do I configure debug logging to a file?

http://wiki.apache.org/solr/SolrLogging

...and since you asked specificly about the example, which uses jetty...

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



-Hoss

Reply via email to