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 James Brady <ja...@gmail.com> on 2009/01/30 22:36:45 UTC

Separate error logs

Hi all,What's the best way for me to split Solr/Lucene error message off to
a separate log?

Thanks
James

Re: Separate error logs

Posted by Ryan McKinley <ry...@gmail.com>.
>
> Is Solr 1.4 (and its nice SLF4J logging) in a state ready for  
> intensive
> production usage?

While it is not officially recommended, trunk is quite stable.

Of course back up and make sure to test well before deploying anything  
real.

ryan

Re: Fwd: Separate error logs

Posted by Marc Sturlese <ma...@gmail.com>.
Hey James,
Your log use case remains me to mine... I wanted to use different log files
fore different cores... for the moment there's no way to separate logs in
different files (as far as I know). I sorted it using log4j. What I do is
send the log data to the linux syslog (using syslog appender). Once the data
is there I just coded some scripts to send it wherever I want. You could
send your data to syslog and parse that file... and depending on if you find
the message TRACE, ERROR, DEBUG... just send that lines to the files you
choose.
This worked for me (not 100% coz there are log messages without the name of
the core) to separate logs depending on the core name without doing any
hack. In your case would work even better coz you always have the log level
in the message.
If someone knows any better way to do that please let me know...



James Brady-3 wrote:
> 
> OK, so java.util.logging has no way of sending error messages to a
> separate
> log without writing your own Handler/Filter code.
> If we just skip over the absurdity of that, and the rage it makes me feel,
> what are my options here? What I'm looking for is for all records to go to
> one file, and records of a ERROR level and above to go to a separate log.
> 
> Can I write my own Handlers/Filters, drop them on Jetty's classpath and
> refer to them in my logging.properties? I.e. without rebuilding the whole
> WAR, with my files added?
> 
> Is Solr 1.4 (and its nice SLF4J logging) in a state ready for intensive
> production usage?
> 
> Thanks!
> James
> 
> ---------- Forwarded message ----------
> From: James Brady <ja...@gmail.com>
> Date: 2009/1/30
> Subject: Re: Separate error logs
> To: solr-user@lucene.apache.org
> 
> 
> Oh... I should really have found that myself :/
> Thank you!
> 
> 2009/1/30 Ryan McKinley <ry...@gmail.com>
> 
> check:
>> http://wiki.apache.org/solr/SolrLogging
>>
>> You configure whatever flavor logger to write error to a separate log
>>
>>
>>
>> On Jan 30, 2009, at 4:36 PM, James Brady wrote:
>>
>>  Hi all,What's the best way for me to split Solr/Lucene error message off
>>> to
>>> a separate log?
>>>
>>> Thanks
>>> James
>>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Separate-error-logs-tp21756080p21876778.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Fwd: Separate error logs

Posted by Chris Hostetter <ho...@fucit.org>.
: OK, so java.util.logging has no way of sending error messages to a separate
: log without writing your own Handler/Filter code.
: If we just skip over the absurdity of that, and the rage it makes me feel,

FWIW: that's a slight mischaracterization of java.util.logging (JUL): the 
API & framework make things like this very easy -- however -- in an 
attempt to encourage the various existing logging communities to implement 
the JUL APIs by writing a LogManager, the default LogManager provided by 
the JRE has an extremely simplistic properties file based configuration 
which (i freely admit even as an advocate of JUL) sucks ass.

a few servlet containers provide their own LogManager which has a more 
robust configuration syntax (Resin being my favorite example of a 
container that does a great job of this)



-Hoss


Fwd: Separate error logs

Posted by James Brady <ja...@gmail.com>.
OK, so java.util.logging has no way of sending error messages to a separate
log without writing your own Handler/Filter code.
If we just skip over the absurdity of that, and the rage it makes me feel,
what are my options here? What I'm looking for is for all records to go to
one file, and records of a ERROR level and above to go to a separate log.

Can I write my own Handlers/Filters, drop them on Jetty's classpath and
refer to them in my logging.properties? I.e. without rebuilding the whole
WAR, with my files added?

Is Solr 1.4 (and its nice SLF4J logging) in a state ready for intensive
production usage?

Thanks!
James

---------- Forwarded message ----------
From: James Brady <ja...@gmail.com>
Date: 2009/1/30
Subject: Re: Separate error logs
To: solr-user@lucene.apache.org


Oh... I should really have found that myself :/
Thank you!

2009/1/30 Ryan McKinley <ry...@gmail.com>

check:
> http://wiki.apache.org/solr/SolrLogging
>
> You configure whatever flavor logger to write error to a separate log
>
>
>
> On Jan 30, 2009, at 4:36 PM, James Brady wrote:
>
>  Hi all,What's the best way for me to split Solr/Lucene error message off
>> to
>> a separate log?
>>
>> Thanks
>> James
>>
>
>

Re: Separate error logs

Posted by James Brady <ja...@gmail.com>.
Oh... I should really have found that myself :/
Thank you!

2009/1/30 Ryan McKinley <ry...@gmail.com>

> check:
> http://wiki.apache.org/solr/SolrLogging
>
> You configure whatever flavor logger to write error to a separate log
>
>
>
> On Jan 30, 2009, at 4:36 PM, James Brady wrote:
>
>  Hi all,What's the best way for me to split Solr/Lucene error message off
>> to
>> a separate log?
>>
>> Thanks
>> James
>>
>
>

Re: Separate error logs

Posted by Ryan McKinley <ry...@gmail.com>.
check:
http://wiki.apache.org/solr/SolrLogging

You configure whatever flavor logger to write error to a separate log


On Jan 30, 2009, at 4:36 PM, James Brady wrote:

> Hi all,What's the best way for me to split Solr/Lucene error message  
> off to
> a separate log?
>
> Thanks
> James