Skip to content
Permalink
Browse files

use log4j logger instead of slf4j

Use junit instead of novocode
Use log4j instead of slf4j. Will change it later to use log4j if
required.
  • Loading branch information...
arunthirupathi committed Aug 6, 2014
1 parent 19f8c6d commit fbb158ce84fedd55c27910f6f426cd8905d5a558
Showing with 19 additions and 7 deletions.
  1. +11 −0 .gitignore
  2. +4 −2 build.gradle
  3. +4 −5 src/main/java/org/tehuti/metrics/JmxReporter.java
@@ -0,0 +1,11 @@
/bin/
*.iml
*.ipr
*.iws
.project
.settings
.gradle
build
.project
.classpath

@@ -7,8 +7,8 @@ repositories {
}

dependencies {
compile "org.slf4j:slf4j-api:1.7.6"
testCompile 'com.novocode:junit-interface:0.9'
compile 'log4j:log4j:1.2.17'
testCompile 'junit:junit:4.6'
}

idea {
@@ -17,3 +17,5 @@ idea {
downloadSources = true
}
}

task wrapper(type: Wrapper) { gradleVersion = '1.12' }
@@ -3,9 +3,9 @@
* file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
* to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
@@ -31,16 +31,15 @@
import javax.management.ObjectName;
import javax.management.ReflectionException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.log4j.Logger;
import org.tehuti.TehutiException;

/**
* Register metrics in JMX as dynamic mbeans based on the metric names
*/
public class JmxReporter implements MetricsReporter {

private static final Logger log = LoggerFactory.getLogger(JmxReporter.class);
private static final Logger log = Logger.getLogger(JmxReporter.class);
private static final Object lock = new Object();
private String prefix;
private final Map<String, TehutiMbean> mbeans = new HashMap<String, TehutiMbean>();

0 comments on commit fbb158c

Please sign in to comment.
You can’t perform that action at this time.