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 0431F200B5E for ; Wed, 10 Aug 2016 15:26:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 02BCA160AA4; Wed, 10 Aug 2016 13:26:31 +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 C5B23160A8F for ; Wed, 10 Aug 2016 15:26:29 +0200 (CEST) Received: (qmail 4480 invoked by uid 500); 10 Aug 2016 13:26:28 -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 4465 invoked by uid 99); 10 Aug 2016 13:26:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 13:26:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1F3FF1858DE for ; Wed, 10 Aug 2016 13:26:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.82 X-Spam-Level: X-Spam-Status: No, score=-0.82 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id txm-BUyJq23w for ; Wed, 10 Aug 2016 13:26:25 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 849355F39A for ; Wed, 10 Aug 2016 13:26:24 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id f65so90827238wmi.0 for ; Wed, 10 Aug 2016 06:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=vFSTybb6o8/8yfEPhAGWISj/h/XpwcdAxnaa71tbbos=; b=kjXnZ5alLJ0TIRsgdDKz/KsCT4XxYx161Jwx4Ls/y/pu6wKL7BEpm1OYznGWsa/95I FyqoprKbucMIdN4k0Q2zOPacmLiSV9Z3N0jJI+B2ZUNxBDnukm8mMXgGRmQwX6Y55AA3 y01CHlhuMugFplkVSRH6+Of35XpzfixDmHWp1bsAwc0XcVjcFDCMI+QAma+8xlr9oI6E bJCDV7bN5vvvFgfFI966vttml4wqEUM3S43JFLuEoU0xiRvo/BnwePeZ/VT9Y1ohU2go FXCnvqExi8yLt12Z0CcSMSE5tystbc2c+3OcQxQ9cyMfMMrR6MngGUlZHrK/vvWJJiMM GDJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=vFSTybb6o8/8yfEPhAGWISj/h/XpwcdAxnaa71tbbos=; b=N7qcw7gZJ4g/05eYom9tardrPizr8AiLTIuceJIMqhdblqSzOWOyIn+K4Vk95/Z6Vk 1P6CCGpq11kJ0tmbix1A0PhqAwW2ckBlkk8INvKiUYQ1Oj1hg85CmeyoULR5vTM4y4wL YgoZiSXzdX5onSgx1CCXBamCZjvo7Q0Ahp3P9YM2Lv6kGLr0au0Bu0mEtaHGHmpFchv/ pfyXKcZGc/U7wiDVTNPZN1Tg9E5DzswxmopN6KYbuCdle4cNvXz/cfgTNjRJLPng7cJO KM6bb+es8j+U/32dd7UrTEqWx0cpvH8m2H7E+CoPK7RwDXnZl0Tw0NbdwFsS/tH92o08 ULhQ== X-Gm-Message-State: AEkooutFcklbI/jrvznUYnF/SeYYkteEqTWfLdy5c7fbWOWxrJtG3NI755RN3MLqWo0uxVoniqRuWVKfAtVO1w== X-Received: by 10.28.27.143 with SMTP id b137mr3623847wmb.12.1470835583180; Wed, 10 Aug 2016 06:26:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.165.73 with HTTP; Wed, 10 Aug 2016 06:26:21 -0700 (PDT) In-Reply-To: References: From: Luca Burgazzoli Date: Wed, 10 Aug 2016 15:26:21 +0200 Message-ID: Subject: Re: Log4j 2 To: dev@camel.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 10 Aug 2016 13:26:31 -0000 tests/camel-itest --> works tests/camel-itest-karaf --> need to keep log4j because of pax logging tests/camel-itest-spring-boot --> migrated I've pushed some new bits with some fixes to my branch as well as some fixes for few test in camel-itest-karaf about system packages needed by Ignite and Drools. I'm almost ready to rebase from master and the merge my work if you do not have any objection. --- Luca Burgazzoli On Wed, Aug 10, 2016 at 8:45 AM, Claus Ibsen wrote: > Hi Luca > > Its a lot of changes but it looks good. > > I think its maybe only the maven archetypes that may need a bit of > manual testing to see if the generated projects are all compiling and > working as expected. > > I noticed on master branch (not yours) that the blueprint archetype do > not log to the console when you run mvn camel:run goal. This is likely > a general problem where we may need to tweak the run goal to automatic > include some kind of logging out of the box (or include the test > scoped src/test/resources/log4j properties) or whatever it takes. > > I suggest you run the tests in > > tests/camel-itest > tests/camel-itest-karaf > tests/camel-itest-spring-boot > > to see if they are still all working. > > However great work to migrate all that. Then we can get this in the > 2.18 release. > > > > > > On Tue, Aug 9, 2016 at 6:12 PM, Luca Burgazzoli wrote: >> I've pushed the latest bit of the migration in my branch. >> Except for the mentioned components, everything else should have been migrated. >> >> I really appreciate if someone could help testing a little bit with a >> focus on tooling, examples and tests. >> >> --- >> Luca Burgazzoli >> >> >> On Tue, Aug 9, 2016 at 2:59 PM, Luca Burgazzoli wrote: >>> I do not remember now but some problems come from the test >>> dependencies we use (like microcluster, etc) >>> Need to digg into the issue more once the majority of the migration will be done >>> >>> --- >>> Luca Burgazzoli >>> >>> >>> On Tue, Aug 9, 2016 at 8:35 AM, Claus Ibsen wrote: >>>> Hi >>>> >>>> Ah sounds good the migration goes so well, and that there is only a >>>> few components that may be stuck on log4j 1.x. But those 3rd party >>>> libraries may migrate to log4j v2 or some other logging api (slf4j-api >>>> etc) in the future. >>>> >>>> Though a bit surprising that Apache Spark is locked down on log4j v1. >>>> >>>> >>>> >>>> On Mon, Aug 8, 2016 at 7:53 PM, 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 through 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 >>>>>>> > 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 party >>>>>>> > 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 fast 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 include 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 then 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 >>>> >>>> >>>> >>>> -- >>>> Claus Ibsen >>>> ----------------- >>>> http://davsclaus.com @davsclaus >>>> Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2