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 John Bickerstaff <jo...@johnbickerstaff.com> on 2017/08/08 22:44:59 UTC

JSON Logs in SOLR 5.x

I'm running Solr 5.x and have the need to push logs into AWS's kinesis
firehose.

As I understand it, I need the logs to be in JSON format.

This page:
https://cwiki.apache.org/confluence/display/solr/Configuring+Logging

Tells me that SOLR is using Log4J version 1.2....

I've played with Log4J configs before - long ago, so I'm somewhat familiar,
but I'd rather not re-invent the wheel.

Can I write JSON log messages by making changes to the log4j configuration
file or is there more work required (some of the web pages I've seen imply
more work necessary...)

This page: https://logging.apache.org/log4j/2.x/manual/layouts.html

Says, under JSONLayout: "This layout requires Jackson jar files..."  I
assume that means Solr would need to contain those - or be recompiled with
them...  Can anyone tell me if Jackson is already is Solr 5.x

Is anyone aware of examples of configuring the Solr log4j config to write
JSON?

Thanks

Re: JSON Logs in SOLR 5.x

Posted by Erick Erickson <er...@gmail.com>.
Jackson should be in core/lib.
find . -name "*.jar* | grep -i jackson
;)

On Tue, Aug 8, 2017 at 3:44 PM, John Bickerstaff
<jo...@johnbickerstaff.com> wrote:
> I'm running Solr 5.x and have the need to push logs into AWS's kinesis
> firehose.
>
> As I understand it, I need the logs to be in JSON format.
>
> This page:
> https://cwiki.apache.org/confluence/display/solr/Configuring+Logging
>
> Tells me that SOLR is using Log4J version 1.2....
>
> I've played with Log4J configs before - long ago, so I'm somewhat familiar,
> but I'd rather not re-invent the wheel.
>
> Can I write JSON log messages by making changes to the log4j configuration
> file or is there more work required (some of the web pages I've seen imply
> more work necessary...)
>
> This page: https://logging.apache.org/log4j/2.x/manual/layouts.html
>
> Says, under JSONLayout: "This layout requires Jackson jar files..."  I
> assume that means Solr would need to contain those - or be recompiled with
> them...  Can anyone tell me if Jackson is already is Solr 5.x
>
> Is anyone aware of examples of configuring the Solr log4j config to write
> JSON?
>
> Thanks