[강운덕] [LUCYSUS-1744] datasender의 로그 출력부 수정.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1464 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2013-04-15 08:39:38 +00:00
parent e09d6058ff
commit 29e5e8d160
2 changed files with 6 additions and 6 deletions
@@ -16,13 +16,13 @@ public class LoggingDataSender implements DataSender {
@Override
public boolean send(TBase<?, ?> data) {
logger.info("send tBase:" + data);
logger.info("send tBase:{]", data);
return true;
}
@Override
public boolean send(Thriftable thriftable) {
logger.info("send thriftable:" + thriftable);
logger.info("send thriftable:{}", thriftable);
return true; //To change body of implemented methods use File | Settings | File Templates.
}
@@ -200,7 +200,7 @@ public class UdpDataSender implements DataSender, Runnable {
} else if (dto instanceof Thriftable) {
tBase = ((Thriftable) dto).toThrift();
} else {
logger.warn("sendPacket fail. invalid type:" + dto.getClass());
logger.warn("sendPacket fail. invalid type:{}", dto.getClass());
return;
}
// single thread이므로 데이터 array를 nocopy해서 보냄.
@@ -215,10 +215,10 @@ public class UdpDataSender implements DataSender, Runnable {
try {
udpSocket.send(reusePacket);
if (logger.isInfoEnabled()) {
logger.info("Data sent. " + dto);
logger.info("Data sent. {}", dto);
}
} catch (IOException e) {
logger.warn("packet send error " + dto, e);
logger.warn("packet send error {}", dto, e);
}
}
@@ -253,7 +253,7 @@ public class UdpDataSender implements DataSender, Runnable {
return serializer.serialize(header, dto);
} catch (TException e) {
if (logger.isWarnEnabled()) {
logger.warn("Serialize fail:" + dto + " Caused:" + e.getMessage(), e);
logger.warn("Serialize fail:{} Caused:{}", new Object[] { dto, e.getMessage(), e});
}
return null;
}