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 93CB6200B90 for ; Sun, 25 Sep 2016 23:35:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 916CD160ACE; Sun, 25 Sep 2016 21:35:46 +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 D6699160ABE for ; Sun, 25 Sep 2016 23:35:45 +0200 (CEST) Received: (qmail 53183 invoked by uid 500); 25 Sep 2016 21:35:45 -0000 Mailing-List: contact commits-help@tamaya.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tamaya.incubator.apache.org Delivered-To: mailing list commits@tamaya.incubator.apache.org Received: (qmail 53174 invoked by uid 99); 25 Sep 2016 21:35:45 -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; Sun, 25 Sep 2016 21:35:45 +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 A3CAE180506 for ; Sun, 25 Sep 2016 21:35:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-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 zHLD5ryG1i8i for ; Sun, 25 Sep 2016 21:35:43 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 2F97D60D25 for ; Sun, 25 Sep 2016 21:35:42 +0000 (UTC) Received: (qmail 52954 invoked by uid 99); 25 Sep 2016 21:35:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Sep 2016 21:35:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 272C7E0ADC; Sun, 25 Sep 2016 21:35:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: plexus@apache.org To: commits@tamaya.incubator.apache.org Date: Sun, 25 Sep 2016 21:35:42 -0000 Message-Id: <815f11d1c0f546d88d45e90091df4400@git.apache.org> In-Reply-To: <3ee5e9d4cb584b9e9b8425c6ba2435f6@git.apache.org> References: <3ee5e9d4cb584b9e9b8425c6ba2435f6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/23] incubator-tamaya-sandbox git commit: Added logging support. archived-at: Sun, 25 Sep 2016 21:35:46 -0000 Added logging support. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/6e6419cb Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/6e6419cb Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/6e6419cb Branch: refs/heads/master Commit: 6e6419cb5f6f8c42cf984702e1110ed7bdf586e9 Parents: 9c922df Author: anatole Authored: Sun Sep 27 23:52:56 2015 +0200 Committer: anatole Committed: Sun Sep 27 23:52:56 2015 +0200 ---------------------------------------------------------------------- .../internal/CLAwareServiceContext.java | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6e6419cb/src/main/java/org/apache/tamaya/clsupport/internal/CLAwareServiceContext.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/tamaya/clsupport/internal/CLAwareServiceContext.java b/src/main/java/org/apache/tamaya/clsupport/internal/CLAwareServiceContext.java index c023cff..02caed0 100644 --- a/src/main/java/org/apache/tamaya/clsupport/internal/CLAwareServiceContext.java +++ b/src/main/java/org/apache/tamaya/clsupport/internal/CLAwareServiceContext.java @@ -28,6 +28,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; /** @@ -45,6 +47,9 @@ import java.util.List; @Priority(10) public class CLAwareServiceContext extends AbstractClassloaderAwareItemLoader implements ServiceContext{ + + private static final Logger LOG = Logger.getLogger(CLAwareServiceContext.class.getName()); + /** * Default location for service loader files. */ @@ -75,6 +80,9 @@ public class CLAwareServiceContext extends AbstractClassloaderAwareItemLoader T getService(Class serviceType, ClassLoader classLoader) { + if(LOG.isLoggable(Level.INFO)) { + LOG.info("Evaluating services for classloader: " + classLoader); + } ServiceContainer container = getItemNoParent(classLoader, true); T singleton = container.getSingleton(serviceType); if(singleton!=null){ + if(LOG.isLoggable(Level.FINEST)) { + LOG.finest("Evaluated singleton of type " + serviceType.getName() + " to " + singleton); + } return singleton; } Collection services = getServices(serviceType, classLoader); @@ -124,6 +138,9 @@ public class CLAwareServiceContext extends AbstractClassloaderAwareItemLoader