You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de> on 2009/04/14 15:56:30 UTC

Disable logging in SOLR

Hi,

is there a way to disable all logging output in SOLR ?
I mean the output text like :

"INFO: [core_de] webapp=/solr path=/update params={wt=json} status=0 
QTime=3736"

greets -Ralf-


Re: Disable logging in SOLR

Posted by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de>.
Mark Miller schrieb:
> Kraus, Ralf | pixelhouse GmbH wrote:
>> Hi,
>>
>> is there a way to disable all logging output in SOLR ?
>> I mean the output text like :
>>
>> "INFO: [core_de] webapp=/solr path=/update params={wt=json} status=0 
>> QTime=3736"
>>
>> greets -Ralf-
>>
> You probably do not want to totally disable logging in Solr. More 
> likely, your looking to make Solr less chatty by not logging the INFO 
> level. Solr is a bit chatty by default, mostly I think, because that 
> can be very useful and is often worth the likely very small 
> performance hit of all the extra logging. At the least though, I think 
> you want to leave Severe/Error logging on in most cases, and possibly 
> WARN.
>
> Its easy enough to change the logging levels though. Solr 1.3 uses 
> java.util.logging and Solr 1.4 uses SLF4J defaulting to 
> java.util.logging.
>
> So you can either change the system level properties file in your JDK 
> folder, or you can use a param at startup: 
> |-Djava.util.logging.config.file=/path/to/my/logging.properties
Thats exactly the way I choose yesterday ;-)

Thx

Greets -Ralf-

Re: Disable logging in SOLR

Posted by Mark Miller <ma...@gmail.com>.
Kraus, Ralf | pixelhouse GmbH wrote:
> Hi,
>
> is there a way to disable all logging output in SOLR ?
> I mean the output text like :
>
> "INFO: [core_de] webapp=/solr path=/update params={wt=json} status=0 
> QTime=3736"
>
> greets -Ralf-
>
You probably do not want to totally disable logging in Solr. More 
likely, your looking to make Solr less chatty by not logging the INFO 
level. Solr is a bit chatty by default, mostly I think, because that can 
be very useful and is often worth the likely very small performance hit 
of all the extra logging. At the least though, I think you want to leave 
Severe/Error logging on in most cases, and possibly WARN.

Its easy enough to change the logging levels though. Solr 1.3 uses 
java.util.logging and Solr 1.4 uses SLF4J defaulting to java.util.logging.

So you can either change the system level properties file in your JDK 
folder, or you can use a param at startup: 
|-Djava.util.logging.config.file=/path/to/my/logging.properties

Then setup a props file. Here is an example from the wiki:

|

# Default global logging level:
.level= INFO

# 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



-- 
- Mark

http://www.lucidimagination.com




Re: Disable logging in SOLR

Posted by Bill Au <bi...@gmail.com>.
Yes, restarting Tomcat will reset things back to default.  But you should be
able to configure Tomcat to disable Solr logging since Solr uses JDK
logging.

Bill

On Wed, Apr 15, 2009 at 4:51 AM, Kraus, Ralf | pixelhouse GmbH <
rk@pixelhouse.de> wrote:

> Bill Au schrieb:
>
>> Have you tried setting logging level to OFF from Solr's admin GUI:
>> http://wiki.apache.org/solr/SolrAdminGUI
>>
>>
> thx 4 the hint !
>
> But after I restart my tomcat its all reseted to default ? :-(
>
> Greets -Ralf-
>

Re: Disable logging in SOLR

Posted by "Kraus, Ralf | pixelhouse GmbH" <rk...@pixelhouse.de>.
Bill Au schrieb:
> Have you tried setting logging level to OFF from Solr's admin GUI:
> http://wiki.apache.org/solr/SolrAdminGUI
>   
thx 4 the hint !

But after I restart my tomcat its all reseted to default ? :-(

Greets -Ralf-

Re: Disable logging in SOLR

Posted by Bill Au <bi...@gmail.com>.
Have you tried setting logging level to OFF from Solr's admin GUI:
http://wiki.apache.org/solr/SolrAdminGUI

Bill

On Tue, Apr 14, 2009 at 9:56 AM, Kraus, Ralf | pixelhouse GmbH <
rk@pixelhouse.de> wrote:

> Hi,
>
> is there a way to disable all logging output in SOLR ?
> I mean the output text like :
>
> "INFO: [core_de] webapp=/solr path=/update params={wt=json} status=0
> QTime=3736"
>
> greets -Ralf-
>
>