Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2A608200B59 for ; Mon, 8 Aug 2016 23:48:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 28F61160A91; Mon, 8 Aug 2016 21:48:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 25B63160A77 for ; Mon, 8 Aug 2016 23:48:58 +0200 (CEST) Received: (qmail 43181 invoked by uid 500); 8 Aug 2016 21:48:57 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 43168 invoked by uid 99); 8 Aug 2016 21:48:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 21:48:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 94DEC1A02CE for ; Mon, 8 Aug 2016 21:48:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.549 X-Spam-Level: * X-Spam-Status: No, score=1.549 tagged_above=-999 required=6.31 tests=[FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id BgWo0AGmoebO for ; Mon, 8 Aug 2016 21:48:46 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 7A1675F29A for ; Mon, 8 Aug 2016 21:48:45 +0000 (UTC) Received: by mail-io0-f182.google.com with SMTP id 38so370550848iol.0 for ; Mon, 08 Aug 2016 14:48:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+qE4bGZ6LWWNQK1rdhc+DjUtFsnxJ/7qx6lu3TT3qRg=; b=X7W9JIdQ7KJpm+8E8c5Hji8Gy7nfl4ZNHMdUL7ezVTuEok6kJs8oG2r6HKu7mCIncY Ey7Yro3ZcY48THWckjUsrVvlj4shGSzpR2nQ6fnX51U8XYpqwLd8MVeNgSwfReDF8656 /yJAksmSD5g1morAZWdx1G2hCae9LwaI5fwSQ8Vn8LZ68nfo0MEg+UsTHpsab0SxHY5I zQosbkMG4BjJJXDQyRakK7yXCM+FX5nEjC+MqvRoIUTaaiiYwgjdhUG2GliOwOLN0J4t 5Ap4WxxmyOFiDGKd+ZZultkS277YMZ7+Zva5Kl53JoKlCkuxblaLGS8cWvueQWlfK5BJ qQwA== X-Gm-Message-State: AEkoouu06fZthygYHntYT0vFt9IC5M1NTqJQ4SlCR7qjcFCgaL8IcurGKuUour1bNZQE8qbDIEjN15tLqgsfHQ== X-Received: by 10.107.59.20 with SMTP id i20mr98928890ioa.145.1470692924164; Mon, 08 Aug 2016 14:48:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vitalii Tymchyshyn Date: Mon, 08 Aug 2016 21:48:33 +0000 Message-ID: Subject: Re: Log4j 2 To: "dev@camel.apache.org" Content-Type: multipart/alternative; boundary=94eb2c05c556518f0305399661b9 archived-at: Mon, 08 Aug 2016 21:48:59 -0000 --94eb2c05c556518f0305399661b9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You can also try log4j over slf4j. This one has stubs for appender classes. Best regards, Vitalii Tymchyshyn =D0=9F=D0=BD, 8 =D1=81=D0=B5=D1=80=D0=BF. 2016 15:42 =D0=BA=D0=BE=D1=80=D0= =B8=D1=81=D1=82=D1=83=D0=B2=D0=B0=D1=87 Luca Burgazzoli =D0=BF=D0=B8=D1=88=D0=B5: > That was what I tried at first but it is not enough because in some deps = or > utilities they use i.e. base appender classes that the is not provided by > the log4j-1.2-api. > > I will detail the issue later this week. > > On Monday, 8 August 2016, Matt Sicker wrote: > > > Can you add log4j-1.2-api to migrate those? We're working with Hadoop a= nd > > Spark right now to upgrade them to 2.x at least, so a future release fr= om > > them will fix that. > > > > On 8 August 2016 at 12:53, Luca Burgazzoli > > wrote: > > > > > Hello, > > > > > > I've setup my own branch > > > (https://github.com/lburgazzoli/apache-camel/tree/CAMEL-10224-log4j2) > > > were I'm doing some test to migrate to log4j2. > > > So far migrating the properties was not an issue and automated throug= h > a > > > script. > > > > > > The following component can't be migrate as they have some code based > on > > > log4j: > > > - camel-spark > > > - camel-spark-rest > > > - camel-sip > > > - camel-hbase > > > > > > For other components I found that log4j.properties was used also to > > > perform some test (i.e. a file to serve in jetty9). > > > > > > All the remaining component and caml-core have been tested an > > > successfully migrated. > > > I still need to migrate examples, tooling and so on. > > > > > > > > > > > > > > > > > > --- > > > Luca Burgazzoli > > > > > > > > > On Tue, Aug 2, 2016 at 10:10 PM, Matt Sicker > > wrote: > > > > We have a ticket to track migration issues: > > > > https://issues.apache.org/jira/browse/LOG4J2-1473 > > > > > > > > On 2 August 2016 at 12:24, James Carman > > > > > wrote: > > > > > > > >> Now, that's a motivation I can get behind! :) > > > >> > > > >> > > > >> On Tue, Aug 2, 2016 at 12:38 PM Matt Sicker > > wrote: > > > >> > > > >> > Another motivation is that when Camel wants to work on JDK9 > support, > > > >> you'll > > > >> > find that log4j 1.x doesn't work anymore. > > > >> > > > > >> > On 2 August 2016 at 11:21, Luca Burgazzoli > > > > > >> wrote: > > > >> > > > > >> > > My only motivation was to keep the dependencies up to date > > > >> > > > > > >> > > --- > > > >> > > Luca Burgazzoli > > > >> > > > > > >> > > > > > >> > > On Tue, Aug 2, 2016 at 5:50 PM, James Carman < > > > >> james@carmanconsulting.com > > > >> > > > > > >> > > wrote: > > > >> > > > If it's only for test, what's the motivation? Is anything > > broken? > > > >> > Does > > > >> > > > anything code directly to the API? > > > >> > > > > > > >> > > > On Tue, Aug 2, 2016 at 11:21 AM Matt Sicker > > > > > >> wrote: > > > >> > > > > > > >> > > >> You can use YAML instead of XML or properties files for a > nice > > > >> config > > > >> > > >> format. Plus, there's a few log4j 1->2 tools out there > already: > > > >> > > >> https://issues.apache.org/jira/browse/LOG4J2-1436 > > > >> > > >> > > > >> > > >> On 2 August 2016 at 09:48, Nicola Ferraro < > > ni.ferraro@gmail.com > > > > >> > wrote: > > > >> > > >> > > > >> > > >> > I logged a Jira: > > > >> https://issues.apache.org/jira/browse/CAMEL-10217 > > > >> > > >> > > > > >> > > >> > > > > >> > > >> > > > > >> > > >> > On Tue, Aug 2, 2016 at 4:35 PM, Claus Ibsen < > > > >> claus.ibsen@gmail.com > > > > >> > > >> wrote: > > > >> > > >> > > > > >> > > >> > > Hi > > > >> > > >> > > > > > >> > > >> > > Yeah some should be removed, but mind that some 3rd par= ty > > > >> > libraries > > > >> > > >> > > are using log4j hardcoded as dependency so not all can = be > > > >> removed. > > > >> > > >> > > > > > >> > > >> > > But I think camel-scr is a mistake to use log4j. > > > >> > > >> > > > > > >> > > >> > > Its worthwhile I think to take a look which one can be > > > removed > > > >> or > > > >> > > not. > > > >> > > >> > > Feel free to log a JIRA and work on this. > > > >> > > >> > > > > > >> > > >> > > On Tue, Aug 2, 2016 at 4:27 PM, Nicola Ferraro < > > > >> > nferraro@redhat.com > > > >> > > > > > > >> > > >> > > wrote: > > > >> > > >> > > > Doing integration tests I found that some components > > > include > > > >> > > logging > > > >> > > >> > > > implementations outside the test scope, so I did a fa= st > > > check: > > > >> > > >> > > > > > > >> > > >> > > > *for comp in $(ls | grep "camel-" | grep -v ".iml"); > do* > > > >> > > >> > > > * cd $comp* > > > >> > > >> > > > * mvn dependency:tree | grep > > > >> > > >> > > > 'log4j\|logback\|slf4j-simple\ > > |slf4j-jdk14\|slf4j-log4j12' > > > | > > > >> > grep > > > >> > > -v > > > >> > > >> > > test | > > > >> > > >> > > > xargs -I line echo "$(pwd) line"* > > > >> > > >> > > > * cd ..* > > > >> > > >> > > > *done* > > > >> > > >> > > > > > > >> > > >> > > > Although it is ok for a spring-boot starter to includ= e > a > > > >> logging > > > >> > > >> > > > implementation, they should not be included in normal > > > >> component > > > >> > > >> modules > > > >> > > >> > > IMO. > > > >> > > >> > > > > > > >> > > >> > > > Should these dependencies be removed? > > > >> > > >> > > > > > > >> > > >> > > > > > > >> > > >> > > > The results: > > > >> > > >> > > > *./camel/components/camel-atmos [INFO] | +- > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-gora [INFO] | +- > > > >> > > >> > > > org.slf4j:slf4j-log4j12:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-gora [INFO] | - > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-hbase [INFO] | +- > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-jbpm [INFO] +- > > > >> > > >> > > > org.slf4j:slf4j-log4j12:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-jbpm [INFO] | - > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-jt400 [INFO] +- > > > >> > > >> > > > org.slf4j:slf4j-log4j12:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-jt400 [INFO] | - > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-krati [INFO] | - > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-openshift [INFO] | - > > > >> > > >> > > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-salesforce [INFO] +- > > > >> > > >> > > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-scr [INFO] +- > > > >> > > >> > > > org.slf4j:slf4j-log4j12:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-scr [INFO] +- > > > >> > > >> log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-spark [INFO] | +- > > > >> > > >> > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-spark [INFO] | | +- > > > >> > > >> > > > log4j:apache-log4j-extras:jar:1.2.17:compile* > > > >> > > >> > > > *./camel/components/camel-spark-rest [INFO] | +- > > > >> > > >> > > > org.slf4j:slf4j-simple:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot [INFO] | | +- > > > >> > > >> > > > ch.qos.logback:logback-classic:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot [INFO] | | | = - > > > >> > > >> > > > ch.qos.logback:logback-core:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot [INFO] | | - > > > >> > > >> > > > org.slf4j:log4j-over-slf4j:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot-starter [INFO] = | > > > | +- > > > >> > > >> > > > ch.qos.logback:logback-classic:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot-starter [INFO] = | > > > | | > > > >> - > > > >> > > >> > > > ch.qos.logback:logback-core:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-spring-boot-starter [INFO] = | > > > | - > > > >> > > >> > > > org.slf4j:log4j-over-slf4j:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-zipkin-starter [INFO] | | > +- > > > >> > > >> > > > ch.qos.logback:logback-classic:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-zipkin-starter [INFO] | | > > | - > > > >> > > >> > > > ch.qos.logback:logback-core:jar:1.1.7:compile* > > > >> > > >> > > > *./camel/components/camel-zipkin-starter [INFO] | | = - > > > >> > > >> > > > org.slf4j:log4j-over-slf4j:jar:1.7.21:compile* > > > >> > > >> > > > *./camel/components/camel-zookeeper [INFO] | +- > > > >> > > >> > > > log4j:log4j:jar:1.2.17:compile* > > > >> > > >> > > > > > > >> > > >> > > > On Tue, Aug 2, 2016 at 3:14 PM, Luca Burgazzoli < > > > >> > > >> lburgazzoli@gmail.com > > > >> > > >> > > > > > >> > > >> > > > wrote: > > > >> > > >> > > > > > > >> > > >> > > >> Yep, I meant upgrading log4j for test only, run-time > > > should > > > >> > > >> > > >> definitively use slf4j-api (or maybe a custom facade= ) > > > >> > > >> > > >> > > > >> > > >> > > >> --- > > > >> > > >> > > >> Luca Burgazzoli > > > >> > > >> > > >> > > > >> > > >> > > >> > > > >> > > >> > > >> On Tue, Aug 2, 2016 at 2:50 PM, Claus Ibsen < > > > >> > > claus.ibsen@gmail.com > > > > >> > > >> > > wrote: > > > >> > > >> > > >> > On Tue, Aug 2, 2016 at 2:42 PM, Luca Burgazzoli < > > > >> > > >> > > lburgazzoli@gmail.com > > > > >> > > >> > > >> wrote: > > > >> > > >> > > >> >> Hello, > > > >> > > >> > > >> >> > > > >> > > >> > > >> >> as log4j 1.2 is EOL since a year, would it make > sense > > > to > > > >> > move > > > >> > > to > > > >> > > >> > > log4j > > > >> > > >> > > >> 2 ? > > > >> > > >> > > >> >> > > > >> > > >> > > >> > > > > >> > > >> > > >> > We only use it for testing. No runtime dependency. > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > > >> > > >> > > >> > log4j v2 did not support log4j.properties file so > any > > > >> > migration > > > >> > > >> was > > > >> > > >> > a > > > >> > > >> > > >> > real pain as the log4j xml file format is verbose > and > > > >> clunky > > > >> > to > > > >> > > >> work > > > >> > > >> > > >> > with. > > > >> > > >> > > >> > > > > >> > > >> > > >> > Only recently they added support for .properties > file > > > but I > > > >> > > think > > > >> > > >> > they > > > >> > > >> > > >> > may have changed the syntax slightly (not sure). > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > >> > > >> > > > > > >> > > >> > > > > >> > > >> > > > >> > > > > > >> > > > > >> http://stackoverflow.com/questions/22485074/log4j-2-doesnt- > > > support-log4j-properties-file-anymore > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > > >> > > >> > > >> > And I think I read somewhere that log4j v1 has > > problems > > > >> with > > > >> > > Java > > > >> > > >> 9. > > > >> > > >> > > >> > > > > >> > > >> > > >> > If migration can be super easy on current 2.18 the= n > it > > > is > > > >> > okay. > > > >> > > >> > > >> > Some kind of migration tool that can covert v1 > > > properties > > > >> to > > > >> > v2 > > > >> > > >> > > >> > properties then that can be doable. > > > >> > > >> > > >> > > > > >> > > >> > > >> > But if not then I would like to postpone this to > Camel > > > 3. > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > > >> > > >> > > >> >> > > > >> > > >> > > >> >> --- > > > >> > > >> > > >> >> Luca Burgazzoli > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > > >> > > >> > > >> > > > > >> > > >> > > >> > -- > > > >> > > >> > > >> > Claus Ibsen > > > >> > > >> > > >> > ----------------- > > > >> > > >> > > >> > http://davsclaus.com @davsclaus > > > >> > > >> > > >> > Camel in Action 2: https://www.manning.com/ibsen2 > > > >> > > >> > > >> > > > >> > > >> > > > > > > >> > > >> > > > > > > >> > > >> > > > > > > >> > > >> > > > -- > > > >> > > >> > > > Nicola Ferraro > > > > >> > > >> > > > Senior Software Engineer, JBoss Fuse > > > >> > > >> > > > > > >> > > >> > > > > > >> > > >> > > > > > >> > > >> > > -- > > > >> > > >> > > Claus Ibsen > > > >> > > >> > > ----------------- > > > >> > > >> > > http://davsclaus.com @davsclaus > > > >> > > >> > > Camel in Action 2: https://www.manning.com/ibsen2 > > > >> > > >> > > > > > >> > > >> > > > > >> > > >> > > > >> > > >> > > > >> > > >> > > > >> > > >> -- > > > >> > > >> Matt Sicker > > > > >> > > >> > > > >> > > > > > >> > > > > >> > > > > >> > > > > >> > -- > > > >> > Matt Sicker > > > > >> > > > > >> > > > > > > > > > > > > > > > > -- > > > > Matt Sicker > > > > > > > > > > > > -- > > Matt Sicker > > > > > > -- > > --- > Luca Burgazzoli > --94eb2c05c556518f0305399661b9--