Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8B03F411 for ; Wed, 10 Apr 2013 15:01:21 +0000 (UTC) Received: (qmail 45892 invoked by uid 500); 10 Apr 2013 15:01:21 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 45755 invoked by uid 500); 10 Apr 2013 15:01:21 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 45744 invoked by uid 99); 10 Apr 2013 15:01:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 15:01:21 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_DBL_REDIR X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of garydgregory@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bk0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Apr 2013 15:01:17 +0000 Received: by mail-bk0-f43.google.com with SMTP id jm2so300432bkc.30 for ; Wed, 10 Apr 2013 08:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=wExbgxA7c1qcSCWtDGQlZ71oLpvfsVf44cbSrT3ulVI=; b=M9Fm8gl5cewzuy+IG5L1k16543Z+20gDOppCTgo3a2akEApxEcw7+qyafmfFkvgfv+ jH8GqTA1qPHscsOaM2h5/iTM+ioLnVf0a9EvPX5U4HlCoTM+LHfdYUJVOndMZ+g4yA8o AZkUf4zwu4OE343C4hm6wmv1MSekImHnHyresNLSoD+evqIRtQJnDsRUcrroVO+7wmq3 3HGzFZKfpW7gh2Q/CYctW7gOM4sG8C2kuwYRXN8ctScigNtV4dFkwSlPKO+H+dSz0yIS Pe6SZ1Rk86pIpK+AHUro4CyLVlbWG15uvQJOJMcH1iXv+b2VgutIXbrsbU4i8LZtdghx tbaQ== MIME-Version: 1.0 X-Received: by 10.205.41.72 with SMTP id tt8mr945422bkb.9.1365606055190; Wed, 10 Apr 2013 08:00:55 -0700 (PDT) Received: by 10.204.32.83 with HTTP; Wed, 10 Apr 2013 08:00:55 -0700 (PDT) In-Reply-To: <1365605944.21024.YahooMailNeo@web120505.mail.ne1.yahoo.com> References: <551E606D-4916-47CD-BF74-D9A01F33F35E@dslextreme.com> <1365605028.58261.YahooMailNeo@web120502.mail.ne1.yahoo.com> <0EFE93B7-A9DC-410C-B40C-F5E96A725806@nicholaswilliams.net> <1365605944.21024.YahooMailNeo@web120505.mail.ne1.yahoo.com> Date: Wed, 10 Apr 2013 11:00:55 -0400 Message-ID: Subject: Re: Maven Group Ids From: Gary Gregory To: Log4J Developers List , Remko Popma Content-Type: multipart/alternative; boundary=bcaec52997c1d2e41304da02ef9a X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52997c1d2e41304da02ef9a Content-Type: text/plain; charset=UTF-8 On Wed, Apr 10, 2013 at 10:59 AM, Remko Popma wrote: > True, but if the exception is clear users will be able to fix the issue > themselves without needing to read the docs... > For people like me who do read docs, it avoid getting the problem in the first place ;) Gary > > How about adding this constructor to > org.apache.logging.slf4j.SLF4JLoggerContext: > > public SLF4JLoggerContext() { > // LOG4J2-204 (improve > error reporting when misconfigured) > try { > Class.forName("org.slf4j.helpers.Log4JLoggerFactory"); > throw new IllegalStateException("slf4j-impl jar is mutually > exclusive with log4j-to-slf4j jar " + > "(the first routes calls from SLF4J to Log4j, the second from > Log4j to SLF4J)"); > } catch (Throwable classNotFoundIsGood) { > } > } > > ------------------------------ > *From:* Gary Gregory > > *To:* Log4J Developers List > *Sent:* Wednesday, April 10, 2013 11:55 PM > > *Subject:* Re: Maven Group Ids > > And better documentation would help too :) > > Gary > > > On Wed, Apr 10, 2013 at 10:46 AM, Nick Williams < > nicholas@nicholaswilliams.net> wrote: > > I like that idea. > > Nick > > On Apr 10, 2013, at 9:43 AM, Remko Popma wrote: > > About the mutual exclusivity, would it be an idea to throw an exception > from either log4j-slf4j-impl or log4j-to-slf4j when it detects that the > other jar is on the classpath? > I just proposed a way to do that in > https://issues.apache.org/jira/browse/LOG4J2-204 > > > > ------------------------------ > *From:* Nick Williams > *To:* Log4J Developers List > *Sent:* Wednesday, April 10, 2013 11:37 PM > *Subject:* Re: Maven Group Ids > > I'm guessing there's no way to tell Maven that two dependencies are > mutually exclusive and cannot both be used (for example, log4j-slf4j-impl > and log4j-to-slf4j)? Because that would be convenient... > > Nick > > On Apr 10, 2013, at 9:30 AM, Ralph Goers wrote: > > Well, I originally had them all in one groupId but it was suggested that > they be split to distinguish core functionality from the extra stuff. That > did and still does make sense to me, although using the groupId may not be > the best way to distinguish it. It might be done simply through a better > web site design. We have had a couple of users now include all the jars in > their project. The different groupIds hasn't stopped that. To be honest, > I'm not really sure what would. > > I have no problem switching back to a single groupId if that is the > consensus, but we really need to lock that down as we can't be doing that > after 2.0 GA is released. > > Ralph > > On Apr 10, 2013, at 6:21 AM, Gary Gregory wrote: > > Hi All: > > I find it confusing to have >1 group Id, for example in Ivy, when I tried > > rev="2.0-beta4" /> > rev="2.0-beta4" /> > rev="2.0-beta4" /> > > it bombed because the 1.2 API is in "org.apache.logging.log4j.adapter" not > "org.apache.logging.log4j" > > What is the point of this complication? It's bad enough we have a bunch of > jars, but multiple group ids? > > Gary > > -- > E-Mail: garydgregory@gmail.com | ggregory@apache.org > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 > Spring Batch in Action: http://bit.ly/bqpbCK > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > > > > > > > > > > -- > E-Mail: garydgregory@gmail.com | ggregory@apache.org > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 > Spring Batch in Action: http://bit.ly/bqpbCK > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > > > -- E-Mail: garydgregory@gmail.com | ggregory@apache.org JUnit in Action, 2nd Ed: http://bit.ly/ECvg0 Spring Batch in Action: http://bit.ly/bqpbCK Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --bcaec52997c1d2e41304da02ef9a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Apr 10, 2013 at 10:59 AM, Remko Popma <remkop@yahoo.com> = wrote:
True, but if the exception is cl= ear users will be able to fix the issue themselves without needing to read = the docs...

For people like me who do read= docs, it avoid getting the problem in the first place ;)

Gary
= =C2=A0

How about adding this constru= ctor to org.apache.logging.slf4j.SLF4JLoggerContext:

=C2=A0=C2=A0=C2=A0=C2=A0public SLF4JLoggerContext() {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0//=C2=A0LOG4J2-204=C2=A0(improve error reporting when miscon= figured)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0try {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Class.forName("org.slf4j.helper= s.Log4JLoggerFactory");
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0throw new IllegalStateException(&quo= t;slf4j-impl jar is mutually exclusive with log4j-to-slf4j jar " +
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "(the first routes calls from= SLF4J to Log4j, the second from Log4j to SLF4J)");
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0} catch (Throwable classNotFoundIsGood) {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0}
=C2=A0=C2=A0=C2=A0=C2=A0}


From: Gary Gregory <garydgregory@gmail= .com>

To:<= /span> Log4J Developers List <log4j-dev@logging.apache.org>
Sent: Wednesday, Apri= l 10, 2013 11:55 PM

Subject: Re: Maven Group Ids

And better documentation = would help too :)

Gary


On Wed, Apr 10, 20= 13 at 10:46 AM, Nick Williams <nicholas@nicho= laswilliams.net> wrote:
I like that idea.

Nick

On Apr 10, 2013, at 9:43 AM, Rem= ko Popma wrote:

About the mu= tual exclusivity, would it be an idea to throw an exception from either=C2= =A0log4j-slf4j-impl or log4j-to-slf4j= when it detects that the other jar is on the classpath?
I just proposed a way to d= o that in=C2=A0https://issues.apache.org/jira/browse/LOG4J2-204




From: Nick Williams <nicholas@nicholaswilliams.net>
To: Log4J Developers List <log4j-dev@loggin= g.apache.org>
Sent: Wednesday, April 10, = 2013 11:37 PM
Subject: R= e: Maven Group Ids

I'm guessing there&= #39;s no way to tell Maven that two dependencies are mutually exclusive and= cannot both be used (for example, log4j-slf4j-impl and log4j-to-slf4j)? Because that would be convenient...

Ni= ck

On Apr 10, 2013, at 9:30 AM, Ralph Go= ers wrote:

Well, I originally had them all in one groupId but it was suggested that th= ey be split to distinguish core functionality from the extra stuff. That di= d and still does make sense to me, although using the groupId may not be th= e best way to distinguish it. =C2=A0It might be done simply through a bette= r web site design. =C2=A0We have had a couple of users now include all the = jars in their project. =C2=A0The different groupIds hasn't stopped that= . =C2=A0To be honest, I'm not really sure what would.

I have no problem switching back to a single groupId if that= is the consensus, but we really need to lock that down as we can't be = doing that after 2.0 GA is released.

Ralph

On Apr 10, 20= 13, at 6:21 AM, Gary Gregory wrote:

Hi All:

I find it confusing to have >1 group Id= , for example in Ivy, when I tried

=C2=A0=C2=A0=C2=A0 <dependency org=3D"org.apache.logging.log4j&= quot; name=3D"log4j-api" rev=3D"2.0-beta4" />
=C2=A0=C2=A0=C2=A0 <dependency org=3D"org.apache.logging.log4j"= ; name=3D"log4j-core" rev=3D"2.0-beta4" />
=C2=A0= =C2=A0=C2=A0 <dependency org=3D"org.apache.logging.log4j" name= =3D"log4j-1.2-api" rev=3D"2.0-beta4" />

it bombed because the 1.2 API is in "org.apache.logging= .log4j.adapter" not "org.apache.logging.log4j"
What is the point of this complication? It's bad enough we = have a bunch of jars, but multiple group ids?

Gary








--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit i= n Action, 2nd Ed: http://bit.ly/ECvg0
Spring Batch in Action: http://bit.ly/bqpbCK
Blog: http://garygregory= .wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory




--
E-Mail:
garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: http://bit.ly/ECvg= 0
Spring Batch in Action: http://bit.ly/bqpbCK
Blog: http:= //garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory= --bcaec52997c1d2e41304da02ef9a--