You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/12/18 11:23:19 UTC
[james-project] 04/13: [Refactoring] use DropWizardMetric in Spring
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 2e9ce57ca809e369bf061252383ca45f8a989f5d
Author: Tran Tien Duc <dt...@linagora.com>
AuthorDate: Fri Dec 13 17:01:40 2019 +0700
[Refactoring] use DropWizardMetric in Spring
---
mailbox/spring/pom.xml | 4 ++++
mailbox/spring/src/test/resources/META-INF/spring/metrics.xml | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/mailbox/spring/pom.xml b/mailbox/spring/pom.xml
index 49f2e97..998bf28 100644
--- a/mailbox/spring/pom.xml
+++ b/mailbox/spring/pom.xml
@@ -76,6 +76,10 @@
</dependency>
<dependency>
<groupId>${james.groupId}</groupId>
+ <artifactId>metrics-logger</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
<artifactId>testing-base</artifactId>
<scope>test</scope>
</dependency>
diff --git a/mailbox/spring/src/test/resources/META-INF/spring/metrics.xml b/mailbox/spring/src/test/resources/META-INF/spring/metrics.xml
index 83c8d78..159a9f9 100644
--- a/mailbox/spring/src/test/resources/META-INF/spring/metrics.xml
+++ b/mailbox/spring/src/test/resources/META-INF/spring/metrics.xml
@@ -22,6 +22,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean id="metricFactory" class="org.apache.james.metrics.api.NoopMetricFactory"/>
+ <bean id="metricRegistry" class="com.codahale.metrics.MetricRegistry" />
+ <bean id="metricFactory" class="org.apache.james.metrics.dropwizard.DropWizardMetricFactory">
+ <constructor-arg index="0" ref="metricRegistry"/>
+ </bean>
</beans>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org