Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DC1B9B6D for ; Tue, 24 Jan 2012 13:11:18 +0000 (UTC) Received: (qmail 8368 invoked by uid 500); 24 Jan 2012 13:11:18 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 8302 invoked by uid 500); 24 Jan 2012 13:11:17 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 8294 invoked by uid 99); 24 Jan 2012 13:11:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 13:11:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Jan 2012 13:11:08 +0000 Received: (qmail 12401 invoked from network); 24 Jan 2012 13:10:46 -0000 Received: from unknown (HELO ?192.168.1.79?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 24 Jan 2012 13:10:46 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: CommonsJdbcEventLogger does not print the queries From: Andrus Adamchik In-Reply-To: <4F1E9494.8060306@rheagroup.com> Date: Tue, 24 Jan 2012 16:10:45 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <1455BBBF-DFE5-4EA8-A9EA-F4F7747F84D6@objectstyle.org> References: <4F1E6D43.5060800@rheagroup.com> <4F1E8129.3060107@rheagroup.com> <4F1E9494.8060306@rheagroup.com> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org Hi Wernke Greatly appreciate if you could open a Jira. We will investigate the = injection issue. Could be a bug. https://issues.apache.org/jira/browse/CAY Thanks! Andrus On Jan 24, 2012, at 2:23 PM, Wernke zur Borg wrote: > On 2012-01-24 11:28, Durchholz, Joachim wrote: >>> Now the question remains, how do you properly inject the logger into = your own JdbcAdapter subclass? >> No coding required, it's part of the logging configuration. >> You configure a logger for the class, or for the package that your = adapter subclass lives in, or for any superpackage of that. >>=20 >> HTH >> Jo >=20 > Thanks, Jo, but this does not seem to be the problem. >=20 > Class JdbcAdapter has this: >=20 > @Inject > protected JdbcEventLogger logger; >=20 > My JdbcAdapter subclass apparently does not get a logger injected -=20 > getLogger() returns null. >=20 > Since I am not yet familiar with DI, I do not know how to get the = logger=20 > injected. >=20 > I do have this, although it might not be needed (it does not make any=20= > difference): >=20 > Module m =3D new Module() { > public void configure(Binder binder) { > = binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class); > ... >=20 > Thanks, Wernke >=20 >=20 >=20 > This email (including any attachments) may contain confidential and/or = privileged > information or information otherwise protected from disclosure. If = you are not the > intended recipient, please notify the sender immediately, do not copy = this message > or any attachments and do not use it or any purpose or disclose its = content to any > person, but delete this message and any attachments from your system. > RHEA System S.A. (RHEA) disclaims any and all liability if this email = transmission > was virus corrupted, altered or falsified. >=20 > If a Non Disclosure Agreement (NDA) exists between RHEA and the = receiving > organization, then all contents shall be considered proprietary and = covered under > the NDA. >=20 >=20 >=20