lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <>
Subject [jira] [Commented] (SOLR-3706) Ship setup to log with log4j.
Date Wed, 06 Mar 2013 04:02:13 GMT


Shawn Heisey commented on SOLR-3706:

bq. I think you need to remove all slf4j jars from the war for it to work. When slf4j-api.jar
is in the war you won't be able to load slf4j-log4j*.jar from external location. Also I believe
various servlet container implementations may require you to put your logging classes in different
places for it to work. For wrapping up /example/ I believe it will work put them all in /example/lib.
Try it.

This is exactly right.  I created a patch that made a "dist-excl-slf4j" build target, and
modified the dist-war-excl-slf4j target.  Hoss committed it for me in SOLR-3918, on the condition
that I updated the wiki, which I did.  Now all slf4j jars are removed from the war.

I use the jetty included with the example in production, and log4j finally worked when I put
the slf4j and log4j jars in lib/ext.

> Ship setup to log with log4j.
> -----------------------------
>                 Key: SOLR-3706
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 5.0, 4.3
> Currently we default to java util logging and it's terrible in my opinion.
> *It's simple built in logger is a 2 line logger.
> *You have to jump through hoops to use your own custom formatter with jetty - either
putting your class in the start.jar or other pain in the butt solutions.
> *It can't roll files by date out of the box.
> I'm sure there are more issues, but those are the ones annoying me now. We should switch
to log4j - it's much nicer and it's easy to get a nice single line format and roll by date,
> If someone wants to use JUL they still can - but at least users could start with something

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message