mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-16 00:05:57 +10:00
[강운덕] [LUCYSUS-1744] MetaObject의 로거 변경.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-profiler-bootstrap/trunk@1599 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package com.profiler.util;
|
||||
|
||||
import com.profiler.logging.Logger;
|
||||
import com.profiler.logging.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class MetaObject<R> {
|
||||
|
||||
private final Logger logger = Logger.getLogger(MetaObject.class.getName());
|
||||
private final Logger logger = LoggerFactory.getLogger(MetaObject.class.getName());
|
||||
|
||||
private String methodName;
|
||||
private Class[] args;
|
||||
@@ -49,10 +50,10 @@ public class MetaObject<R> {
|
||||
try {
|
||||
return (R) method.invoke(target, args);
|
||||
} catch (IllegalAccessException e) {
|
||||
logger.log(Level.WARNING, "invoke fail", e);
|
||||
logger.warn("{} invoke fail", this.methodName, e);
|
||||
return defaultReturnValue;
|
||||
} catch (InvocationTargetException e) {
|
||||
logger.log(Level.WARNING, "invoke fail", e);
|
||||
logger.warn("{} invoke fail", this.methodName, e);
|
||||
return defaultReturnValue;
|
||||
}
|
||||
}
|
||||
@@ -61,7 +62,7 @@ public class MetaObject<R> {
|
||||
try {
|
||||
return aClass.getMethod(this.methodName, this.args);
|
||||
} catch (NoSuchMethodException e) {
|
||||
logger.log(Level.WARNING, this.methodName + " not found cls:" + aClass + " Caused:" + e.getMessage(), e);
|
||||
logger.warn("{} not found cls:{} Caused:{}", new Object[] { this.methodName, aClass, e.getMessage(), e });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user