sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-nosql-couchbase-resourceprovider] 11/28: SLING-4381 enable metrics logging for nosql adapter and disable event distribution
Date Tue, 07 Nov 2017 09:56:06 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.nosql.couchbase-resourceprovider-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-couchbase-resourceprovider.git

commit 074913a9faf5ab4a4af6b63ed3dfdb59287c7a01
Author: Stefan Seifert <sseifert@apache.org>
AuthorDate: Thu May 21 14:09:21 2015 +0000

    SLING-4381 enable metrics logging for nosql adapter and disable event distribution
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/nosql/couchbase-resourceprovider@1680879
13f79535-47bb-0310-9956-ffa450edef68
---
 .../impl/CouchbaseNoSqlResourceProviderFactory.java                | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
index 3c63704..086d64a 100644
--- a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
+++ b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
@@ -30,10 +30,12 @@ import org.apache.sling.api.resource.ResourceProvider;
 import org.apache.sling.api.resource.ResourceProviderFactory;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.nosql.couchbase.client.CouchbaseClient;
+import org.apache.sling.nosql.generic.adapter.MetricsNoSqlAdapterWrapper;
 import org.apache.sling.nosql.generic.adapter.NoSqlAdapter;
 import org.apache.sling.nosql.generic.resource.AbstractNoSqlResourceProviderFactory;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.event.EventAdmin;
+import org.slf4j.LoggerFactory;
 
 /**
  * {@link ResourceProviderFactory} implementation that uses couchbase as
@@ -50,7 +52,7 @@ import org.osgi.service.event.EventAdmin;
 public class CouchbaseNoSqlResourceProviderFactory extends AbstractNoSqlResourceProviderFactory
{
 
     /**
-     * Couchbase Client ID for Couchbase Resource Provier
+     * Couchbase Client ID for Couchbase Resource Provider
      */
     public static final String COUCHBASE_CLIENT_ID = "sling-resourceprovider-couchbase";
     
@@ -78,7 +80,8 @@ public class CouchbaseNoSqlResourceProviderFactory extends AbstractNoSqlResource
 
     @Override
     protected NoSqlAdapter getNoSqlAdapter() {
-        return noSqlAdapter;
+        // enable call logging and metrics for {@link CouchbaseNoSqlAdapter}
+        return new MetricsNoSqlAdapterWrapper(noSqlAdapter, LoggerFactory.getLogger(CouchbaseNoSqlAdapter.class));
     }
 
     @Override

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message