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 Anand Henry <an...@gmail.com> on 2012/02/25 00:38:51 UTC
Send SOLR logs to syslog
Hi,
How do you configure default SOLR app running on jetty to send logs to
syslog? I am using Solr 3.4.
I understand I have to direct it via slf4j to log4j to syslog. Here is what
I have done so far, but no luck.
Dropped slf4j-log4j12-1.6.4.jar and log4j-1.2.16.jar in example/lib
log4.properties (location example/log4j.properties)
Contents of log4j.properties
log4j.appender.solrLog=org.apache.log4j.net.SyslogAppender
log4j.appender.solrLog.Facility=LOCAL7
log4j.appender.solrLog.SyslogHost=127.0.0.1
log4j.appender.solrLog.layout=org.apache.log4j.PatternLayout
log4j.appender.solrLog.layout.ConversionPattern=solr: %-4r [%t] %-5p %c -
%m%n
Does anyone know what am I missing?
- Anand
Re: Send SOLR logs to syslog
Posted by Mark Miller <ma...@gmail.com>.
Looks like you are using a java util logging sys prop and pointing to a log4j config file?
On Feb 24, 2012, at 6:42 PM, Anand Henry wrote:
> Forgot to mention, I also append arg
> '-Djava.util.logging.config.file=log4j.properties' on start up.
>
> On Fri, Feb 24, 2012 at 3:38 PM, Anand Henry <an...@gmail.com>wrote:
>
>> Hi,
>>
>> How do you configure default SOLR app running on jetty to send logs to
>> syslog? I am using Solr 3.4.
>>
>> I understand I have to direct it via slf4j to log4j to syslog. Here is
>> what I have done so far, but no luck.
>>
>> Dropped slf4j-log4j12-1.6.4.jar and log4j-1.2.16.jar in example/lib
>>
>> log4.properties (location example/log4j.properties)
>>
>> Contents of log4j.properties
>> log4j.appender.solrLog=org.apache.log4j.net.SyslogAppender
>> log4j.appender.solrLog.Facility=LOCAL7
>> log4j.appender.solrLog.SyslogHost=127.0.0.1
>> log4j.appender.solrLog.layout=org.apache.log4j.PatternLayout
>> log4j.appender.solrLog.layout.ConversionPattern=solr: %-4r [%t] %-5p %c -
>> %m%n
>>
>> Does anyone know what am I missing?
>>
>> - Anand
>>
- Mark Miller
lucidimagination.com
Re: Send SOLR logs to syslog
Posted by Anand Henry <an...@gmail.com>.
Forgot to mention, I also append arg
'-Djava.util.logging.config.file=log4j.properties' on start up.
On Fri, Feb 24, 2012 at 3:38 PM, Anand Henry <an...@gmail.com>wrote:
> Hi,
>
> How do you configure default SOLR app running on jetty to send logs to
> syslog? I am using Solr 3.4.
>
> I understand I have to direct it via slf4j to log4j to syslog. Here is
> what I have done so far, but no luck.
>
> Dropped slf4j-log4j12-1.6.4.jar and log4j-1.2.16.jar in example/lib
>
> log4.properties (location example/log4j.properties)
>
> Contents of log4j.properties
> log4j.appender.solrLog=org.apache.log4j.net.SyslogAppender
> log4j.appender.solrLog.Facility=LOCAL7
> log4j.appender.solrLog.SyslogHost=127.0.0.1
> log4j.appender.solrLog.layout=org.apache.log4j.PatternLayout
> log4j.appender.solrLog.layout.ConversionPattern=solr: %-4r [%t] %-5p %c -
> %m%n
>
> Does anyone know what am I missing?
>
> - Anand
>