Tiny optimization - no need to create a string when there's nothing to log

This commit is contained in:
Trustin Lee 2009-05-21 12:04:28 +00:00
parent 031c26482c
commit f0a96e7417

View File

@ -97,8 +97,9 @@ public class LoggingHandler implements ChannelUpstreamHandler, ChannelDownstream
}
protected void log(ChannelEvent e) {
String msg = e.toString();
if (logger.isDebugEnabled()) {
String msg = e.toString();
// Append hex dump if necessary.
if (hexDump && e instanceof MessageEvent) {
MessageEvent me = (MessageEvent) e;