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 Aman Tandon <am...@gmail.com> on 2014/04/12 15:26:36 UTC
stucked with log4j configuration
I have upgraded my solr4.2 to solr 4.7.1 but in my logs there is an error
for log4j
log4j: Could not find resource
Please find the attachment of the screenshot of the error console
https://drive.google.com/file/d/0B5GzwVkR3aDzdjE1b2tXazdxcGs/edit?usp=sharing
--
With Regards
Aman Tandon
Re: stucked with log4j configuration
Posted by Shawn Heisey <so...@elyograg.org>.
On 4/13/2014 1:18 PM, Boogie Shafer wrote:
> as you discovered, the double logging problem is because additivity is default enabled and you have solr event defined specifically AND in the root logger
My config has the root logger at WARN, the specific category is at INFO.
All of the doubly logged messages are at INFO, so they should not be
logged by the root logger. I would call that a bug in log4j. I have
the issue under control by turning additivity off. When I have a
moment, I will check the log4j bug tracker to see if it's already been
reported.
> on your log4jv2 v logback investigation
>
> logback IS "log4j done right" and the way to go. its here today and works.
> http://logback.qos.ch/reasonsToSwitch.html
>
> I've never understood the point of the log4j2 project. or why folks still want to use log4j given its deficiencies relative to logback. ;)
I was just noting what's supported by slf4j and what isn't. I can't say
which is better between logback and log4j2, because I have not looked
into the capabilities or documentation on either project. It's not high
enough on my priority list.
> is this a good place to ask about a few logging related items re: solr support for them?
>
> -more up to date slf4j included in the distribution (e.g 1.7.7) . slf4j has gotten more than a few updates in the 8 release since 1.6.6 (which is what is currently packaged with solr)
> http://www.slf4j.org/news.html
Solr is part of the Lucene project. Because Lucene is a programming
API, one very important guideline in the project can be stated as "Don't
break compatibility unless it's necessary." This conservative approach
extends to Solr.
This means that we don't upgrade our dependencies just because a new
version has come out. There needs to be a specific reason to upgrade.
It mostly happens when there's a bug to be fixed or a new feature cannot
be implemented properly without the upgrade. Sometimes we do upgrade if
there's a distinct advantage. See SOLR-5765 -- version 4.8.0 will
release with slf4j 1.7.6.
When we upgrade our dependencies, users that have been using Solr or
SolrJ with other software projects may run into a compatibility problem
that did not exist before they upgraded. When someone asks why we broke
their setup, we better have a good reason.
> -if not switching to logback, a more up to date log4j included in the distribution (e.g. 1.2.17) (since that seems to be the logger of choice for the solr devs)
>
> -if sticking with log4j, switching to the log4j.xml version of the config file which allows some more configuration options and is apparently the current preferred format
>
> -if sticking with log4j, consider also packaging the log4j extras jar to extend the capabilities of regular log4j and get it closer to logback (e.g. log rotation with compression)
The Solr example is only one release back - 1.2.16. Anyone is free to
use the XML config format, upgrade slf4j, upgrade log4j, include
additional jars for additional features, or switch to an entirely new
logging framework. This is why we removed the logging jars from the
.war file in version 4.3.0. In my own Solr install, I have upgraded all
these components to more recent versions. I am in a position to make
that decision for myself.
> -fixing the solr logging UI display so it can work even if the solr events are NOT sent to the root logger. (maybe this UI interface should allow picking a specific log file defined in the logging configuration for max flexibility?)
If you have an idea and there's not already an issue for it in Jira,
feel free to open one. If you can write a patch to implement your idea,
even better.
Thanks,
Shawn
RE: stucked with log4j configuration
Posted by Boogie Shafer <bo...@ebrary.com>.
shawn,
as you discovered, the double logging problem is because additivity is default enabled and you have solr event defined specifically AND in the root logger
--
on your log4jv2 v logback investigation
logback IS "log4j done right" and the way to go. its here today and works.
http://logback.qos.ch/reasonsToSwitch.html
I've never understood the point of the log4j2 project. or why folks still want to use log4j given its deficiencies relative to logback. ;)
--
is this a good place to ask about a few logging related items re: solr support for them?
-more up to date slf4j included in the distribution (e.g 1.7.7) . slf4j has gotten more than a few updates in the 8 release since 1.6.6 (which is what is currently packaged with solr)
http://www.slf4j.org/news.html
-if not switching to logback, a more up to date log4j included in the distribution (e.g. 1.2.17) (since that seems to be the logger of choice for the solr devs)
-if sticking with log4j, switching to the log4j.xml version of the config file which allows some more configuration options and is apparently the current preferred format
-if sticking with log4j, consider also packaging the log4j extras jar to extend the capabilities of regular log4j and get it closer to logback (e.g. log rotation with compression)
https://logging.apache.org/log4j/extras/changes-report.html
https://logging.apache.org/log4j/extras/apidocs/index.html
-fixing the solr logging UI display so it can work even if the solr events are NOT sent to the root logger. (maybe this UI interface should allow picking a specific log file defined in the logging configuration for max flexibility?)
its easy enough to make all these changes after the fact and with the exception of the solr logger UI not working, there is very little technical effort required
________________________________________
From: Shawn Heisey <so...@elyograg.org>
Sent: Sunday, April 13, 2014 08:22
To: solr-user@lucene.apache.org
Subject: Re: stucked with log4j configuration
On 4/12/2014 9:33 PM, Bill Bell wrote:
> Well I hope log4j2 is something Solr supports when GA
The biggest holdup would be the fact that slf4j doesn't yet have a
binding for log4j2. A new log watcher (for the admin UI) is probably
required too.
The logback project page looks almost identical to the slf4j project
page. Logback is a native logging implementation in slf4j. I'm
guessing the two projects have the same author and/or the same dev team.
The "between the lines" message I get from the Logback project page is
that it is "log4j done right."
http://slf4j.org/
http://logback.qos.ch/
Because they have a product that competes with log4j2 in more than just
function, they probably won't add log4j2 support before GA. Hopefully
they WILL add it.
Thanks,
Shawn
Re: stucked with log4j configuration
Posted by Shawn Heisey <so...@elyograg.org>.
On 4/12/2014 9:33 PM, Bill Bell wrote:
> Well I hope log4j2 is something Solr supports when GA
The biggest holdup would be the fact that slf4j doesn't yet have a
binding for log4j2. A new log watcher (for the admin UI) is probably
required too.
The logback project page looks almost identical to the slf4j project
page. Logback is a native logging implementation in slf4j. I'm
guessing the two projects have the same author and/or the same dev team.
The "between the lines" message I get from the Logback project page is
that it is "log4j done right."
http://slf4j.org/
http://logback.qos.ch/
Because they have a product that competes with log4j2 in more than just
function, they probably won't add log4j2 support before GA. Hopefully
they WILL add it.
Thanks,
Shawn
Re: stucked with log4j configuration
Posted by Bill Bell <bi...@gmail.com>.
Well I hope log4j2 is something Solr supports when GA
Bill Bell
Sent from mobile
> On Apr 12, 2014, at 7:26 AM, Aman Tandon <am...@gmail.com> wrote:
>
> I have upgraded my solr4.2 to solr 4.7.1 but in my logs there is an error
> for log4j
>
> log4j: Could not find resource
>
> Please find the attachment of the screenshot of the error console
> https://drive.google.com/file/d/0B5GzwVkR3aDzdjE1b2tXazdxcGs/edit?usp=sharing
> --
> With Regards
> Aman Tandon
Re: stucked with log4j configuration
Posted by Jack Krupansky <ja...@basetechnology.com>.
Consider the Heliosearch distribution of Solr (HDS) - it comes
pre-configured for Tomcat:
http://heliosearch.com/heliosearch-distribution-for-solr/
-- Jack Krupansky
-----Original Message-----
From: Aman Tandon
Sent: Saturday, April 12, 2014 10:16 AM
To: solr-user@lucene.apache.org
Subject: Re: stucked with log4j configuration
Haha...Yeah i thought its about 17/18 hours of try to integrate solr with
tomcat if you don't know about anything.
Thanks for these resources let's see what can happen :D
On Sat, Apr 12, 2014 at 7:09 PM, Erick Erickson
<er...@gmail.com>wrote:
> Have you seen:
> https://wiki.apache.org/solr/SolrTomcat#Logging
> and
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
> ?
> Best,
> Erick
>
> P.S. I don't know much about setting up Tomcat, so that's the best I can
> do...
>
> On Sat, Apr 12, 2014 at 6:26 AM, Aman Tandon <am...@gmail.com>
> wrote:
> > I have upgraded my solr4.2 to solr 4.7.1 but in my logs there is an
> > error
> > for log4j
> >
> > log4j: Could not find resource
> >
> > Please find the attachment of the screenshot of the error console
> >
> https://drive.google.com/file/d/0B5GzwVkR3aDzdjE1b2tXazdxcGs/edit?usp=sharing
> > --
> > With Regards
> > Aman Tandon
>
--
With Regards
Aman Tandon
Re: stucked with log4j configuration
Posted by Aman Tandon <am...@gmail.com>.
Haha...Yeah i thought its about 17/18 hours of try to integrate solr with
tomcat if you don't know about anything.
Thanks for these resources let's see what can happen :D
On Sat, Apr 12, 2014 at 7:09 PM, Erick Erickson <er...@gmail.com>wrote:
> Have you seen:
> https://wiki.apache.org/solr/SolrTomcat#Logging
> and
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html
> ?
> Best,
> Erick
>
> P.S. I don't know much about setting up Tomcat, so that's the best I can
> do...
>
> On Sat, Apr 12, 2014 at 6:26 AM, Aman Tandon <am...@gmail.com>
> wrote:
> > I have upgraded my solr4.2 to solr 4.7.1 but in my logs there is an error
> > for log4j
> >
> > log4j: Could not find resource
> >
> > Please find the attachment of the screenshot of the error console
> >
> https://drive.google.com/file/d/0B5GzwVkR3aDzdjE1b2tXazdxcGs/edit?usp=sharing
> > --
> > With Regards
> > Aman Tandon
>
--
With Regards
Aman Tandon
Re: stucked with log4j configuration
Posted by Erick Erickson <er...@gmail.com>.
Have you seen:
https://wiki.apache.org/solr/SolrTomcat#Logging
and
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
?
Best,
Erick
P.S. I don't know much about setting up Tomcat, so that's the best I can do...
On Sat, Apr 12, 2014 at 6:26 AM, Aman Tandon <am...@gmail.com> wrote:
> I have upgraded my solr4.2 to solr 4.7.1 but in my logs there is an error
> for log4j
>
> log4j: Could not find resource
>
> Please find the attachment of the screenshot of the error console
> https://drive.google.com/file/d/0B5GzwVkR3aDzdjE1b2tXazdxcGs/edit?usp=sharing
> --
> With Regards
> Aman Tandon