From f15617fbb283b1e8c0d474fb4c39ad35533db86d Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 24 Aug 2011 12:51:39 -0700 Subject: [PATCH] 293739 - Deprecate static Jetty Log usage in favor of named logs + Finished conversion of jetty-continuation, jetty-http, jetty-io --- .../continuation/Jetty6Continuation.java | 7 +++-- .../eclipse/jetty/http/AbstractGenerator.java | 7 +++-- .../org/eclipse/jetty/http/HttpFields.java | 11 ++++--- .../org/eclipse/jetty/http/HttpGenerator.java | 11 ++++--- .../org/eclipse/jetty/http/HttpParser.java | 7 +++-- .../org/eclipse/jetty/http/MimeTypes.java | 11 ++++--- .../jetty/http/security/Credential.java | 13 +++++--- .../eclipse/jetty/http/security/Password.java | 5 ++- .../org/eclipse/jetty/io/AbstractBuffer.java | 5 ++- .../eclipse/jetty/io/AbstractConnection.java | 7 +++-- .../jetty/io/UncheckedPrintWriter.java | 5 ++- .../eclipse/jetty/io/bio/SocketEndPoint.java | 5 ++- .../eclipse/jetty/io/nio/ChannelEndPoint.java | 7 +++-- .../NetworkTrafficSelectChannelEndPoint.java | 11 ++++--- .../io/nio/SslSelectChannelEndPoint.java | 31 ++++++++++--------- 15 files changed, 93 insertions(+), 50 deletions(-) diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Jetty6Continuation.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Jetty6Continuation.java index 32c7c30ebb1..da0c080ea36 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Jetty6Continuation.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Jetty6Continuation.java @@ -8,8 +8,7 @@ import javax.servlet.ServletResponse; import javax.servlet.ServletResponseWrapper; import org.mortbay.log.Log; - - +import org.mortbay.log.Logger; /* ------------------------------------------------------------ */ /** @@ -19,6 +18,8 @@ import org.mortbay.log.Log; */ public class Jetty6Continuation implements ContinuationFilter.FilteredContinuation { + private static final Logger LOG = Log.getLogger(Jetty6Continuation.class.getName()); + // Exception reused for all continuations // Turn on debug in ContinuationFilter to see real stack trace. private final static ContinuationThrowable __exception = new ContinuationThrowable(); @@ -40,7 +41,7 @@ public class Jetty6Continuation implements ContinuationFilter.FilteredContinuati { if (!ContinuationFilter._initialized) { - Log.warn("!ContinuationFilter installed"); + LOG.warn("!ContinuationFilter installed",null,null); throw new IllegalStateException("!ContinuationFilter installed"); } _request=request; diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/AbstractGenerator.java b/jetty-http/src/main/java/org/eclipse/jetty/http/AbstractGenerator.java index 0b1163a7927..97c81ab90df 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/AbstractGenerator.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/AbstractGenerator.java @@ -22,6 +22,7 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EofException; import org.eclipse.jetty.io.View; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -34,6 +35,8 @@ import org.eclipse.jetty.util.log.Log; */ public abstract class AbstractGenerator implements Generator { + private static final Logger LOG = Log.getLogger(AbstractGenerator.class); + // states public final static int STATE_HEADER = 0; public final static int STATE_CONTENT = 2; @@ -410,8 +413,8 @@ public abstract class AbstractGenerator implements Generator if (_contentLength >= 0 && _contentLength != _contentWritten && !_head) { - if (Log.isDebugEnabled()) - Log.debug("ContentLength written=="+_contentWritten+" != contentLength=="+_contentLength); + if (LOG.isDebugEnabled()) + LOG.debug("ContentLength written=="+_contentWritten+" != contentLength=="+_contentLength); _persistent = false; } } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java index 5b3c413eff0..33f8056950b 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java @@ -44,6 +44,7 @@ import org.eclipse.jetty.util.QuotedStringTokenizer; import org.eclipse.jetty.util.StringMap; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -55,7 +56,9 @@ import org.eclipse.jetty.util.log.Log; * */ public class HttpFields -{ +{ + private static final Logger LOG = Log.getLogger(HttpFields.class); + /* ------------------------------------------------------------ */ public static final String __COOKIE_DELIM="\"\\\n\r\t\f\b%+ ;="; public static final TimeZone __GMT = TimeZone.getTimeZone("GMT"); @@ -242,7 +245,7 @@ public class HttpFields } catch (java.lang.Exception e) { - // Log.ignore(e); + // LOG.ignore(e); } } @@ -259,7 +262,7 @@ public class HttpFields } catch (java.lang.Exception e) { - // Log.ignore(e); + // LOG.ignore(e); } } } @@ -1058,7 +1061,7 @@ public class HttpFields } catch (Exception e) { - Log.warn(e); + LOG.warn(e); return e.toString(); } } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java index 144bf10278e..d83cb890bec 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java @@ -25,6 +25,7 @@ import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EofException; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -35,6 +36,8 @@ import org.eclipse.jetty.util.log.Log; */ public class HttpGenerator extends AbstractGenerator { + private static final Logger LOG = Log.getLogger(HttpGenerator.class); + // Build cache of response lines for status private static class Status { @@ -154,7 +157,7 @@ public class HttpGenerator extends AbstractGenerator if (_last || _state==STATE_END) { - Log.debug("Ignoring extra content {}",content); + LOG.debug("Ignoring extra content {}",content); content.clear(); return; } @@ -239,7 +242,7 @@ public class HttpGenerator extends AbstractGenerator if (_last || _state==STATE_END) { - Log.debug("Ignoring extra content {}",Byte.valueOf(b)); + LOG.debug("Ignoring extra content {}",Byte.valueOf(b)); return false; } @@ -345,7 +348,7 @@ public class HttpGenerator extends AbstractGenerator } catch(InterruptedException e) { - Log.debug(e); + LOG.debug(e); throw new InterruptedIOException(e.toString()); } } @@ -912,7 +915,7 @@ public class HttpGenerator extends AbstractGenerator } catch (IOException e) { - Log.ignore(e); + LOG.ignore(e); throw (e instanceof EofException) ? e:new EofException(e); } } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java index 4922b82c90b..aecc18b069c 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java @@ -26,9 +26,12 @@ import org.eclipse.jetty.io.View; import org.eclipse.jetty.io.bio.StreamEndPoint; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; public class HttpParser implements Parser { + private static final Logger LOG = Log.getLogger(HttpParser.class); + // States public static final int STATE_START=-14; public static final int STATE_FIELD0=-13; @@ -488,7 +491,7 @@ public class HttpParser implements Parser } catch(NumberFormatException e) { - Log.ignore(e); + LOG.ignore(e); throw new HttpException(HttpStatus.BAD_REQUEST_400); } if (_contentLength <= 0) @@ -930,7 +933,7 @@ public class HttpParser implements Parser } catch(IOException e) { - Log.debug(e); + LOG.debug(e); throw (e instanceof EofException) ? e:new EofException(e); } } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java b/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java index 5344863c3bd..ffb8bf5c6e2 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java @@ -25,6 +25,7 @@ import org.eclipse.jetty.io.BufferCache; import org.eclipse.jetty.io.BufferCache.CachedBuffer; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ @@ -33,6 +34,8 @@ import org.eclipse.jetty.util.log.Log; */ public class MimeTypes { + private static final Logger LOG = Log.getLogger(MimeTypes.class); + public final static String FORM_ENCODED="application/x-www-form-urlencoded", MESSAGE_HTTP="message/http", @@ -132,8 +135,8 @@ public class MimeTypes } catch(MissingResourceException e) { - Log.warn(e.toString()); - Log.debug(e); + LOG.warn(e.toString()); + LOG.debug(e); } try @@ -148,8 +151,8 @@ public class MimeTypes } catch(MissingResourceException e) { - Log.warn(e.toString()); - Log.debug(e); + LOG.warn(e.toString()); + LOG.debug(e); } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/security/Credential.java b/jetty-http/src/main/java/org/eclipse/jetty/http/security/Credential.java index ec3278c0f98..93dfa1c5f4d 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/security/Credential.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/security/Credential.java @@ -19,6 +19,7 @@ import java.security.MessageDigest; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.TypeUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -37,6 +38,8 @@ import org.eclipse.jetty.util.log.Log; */ public abstract class Credential implements Serializable { + private static final Logger LOG = Log.getLogger(Credential.class); + private static final long serialVersionUID = -7760551052768181572L; /* ------------------------------------------------------------ */ @@ -91,7 +94,7 @@ public abstract class Credential implements Serializable if (credentials instanceof char[]) credentials=new String((char[])credentials); if (!(credentials instanceof String) && !(credentials instanceof Password)) - Log.warn("Can't check " + credentials.getClass() + " against CRYPT"); + LOG.warn("Can't check " + credentials.getClass() + " against CRYPT"); String passwd = credentials.toString(); return _cooked.equals(UnixCrypt.crypt(passwd, _cooked)); @@ -172,13 +175,13 @@ public abstract class Credential implements Serializable } else { - Log.warn("Can't check " + credentials.getClass() + " against MD5"); + LOG.warn("Can't check " + credentials.getClass() + " against MD5"); return false; } } catch (Exception e) { - Log.warn(e); + LOG.warn(e); return false; } } @@ -199,7 +202,7 @@ public abstract class Credential implements Serializable } catch (Exception e) { - Log.warn(e); + LOG.warn(e); return null; } } @@ -213,7 +216,7 @@ public abstract class Credential implements Serializable } catch (Exception e) { - Log.warn(e); + LOG.warn(e); return null; } } diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/security/Password.java b/jetty-http/src/main/java/org/eclipse/jetty/http/security/Password.java index 5f320fd8a5e..8e2699854aa 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/security/Password.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/security/Password.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.util.Arrays; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -48,6 +49,8 @@ import org.eclipse.jetty.util.log.Log; */ public class Password extends Credential { + private static final Logger LOG = Log.getLogger(Password.class); + private static final long serialVersionUID = 5062906681431569445L; public static final String __OBFUSCATE = "OBF:"; @@ -210,7 +213,7 @@ public class Password extends Credential } catch (IOException e) { - Log.warn(Log.EXCEPTION, e); + LOG.warn(Log.EXCEPTION, e); } if (passwd == null || passwd.length() == 0) passwd = promptDft; } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractBuffer.java b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractBuffer.java index 366d6c3281b..1b7ca44b6fe 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractBuffer.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractBuffer.java @@ -19,6 +19,7 @@ import java.io.OutputStream; import org.eclipse.jetty.util.TypeUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /** * @@ -26,6 +27,8 @@ import org.eclipse.jetty.util.log.Log; */ public abstract class AbstractBuffer implements Buffer { + private static final Logger LOG = Log.getLogger(AbstractBuffer.class); + private final static boolean __boundsChecking = Boolean.getBoolean("org.eclipse.jetty.io.AbstractBuffer.boundsChecking"); protected final static String @@ -637,7 +640,7 @@ public abstract class AbstractBuffer implements Buffer } catch(Exception e) { - Log.warn(e); + LOG.warn(e); return new String(asArray(), 0, length()); } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java index 01a8a778288..04a6e26ec87 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java @@ -3,10 +3,13 @@ package org.eclipse.jetty.io; import java.io.IOException; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; public abstract class AbstractConnection implements Connection { + private static final Logger LOG = Log.getLogger(AbstractConnection.class); + private final long _timeStamp; protected final EndPoint _endp; @@ -40,7 +43,7 @@ public abstract class AbstractConnection implements Connection } catch(IOException e) { - Log.ignore(e); + LOG.ignore(e); try { @@ -48,7 +51,7 @@ public abstract class AbstractConnection implements Connection } catch(IOException e2) { - Log.ignore(e2); + LOG.ignore(e2); } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/UncheckedPrintWriter.java b/jetty-io/src/main/java/org/eclipse/jetty/io/UncheckedPrintWriter.java index 7be12a17d14..f114417e800 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/UncheckedPrintWriter.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/UncheckedPrintWriter.java @@ -22,6 +22,7 @@ import java.io.PrintWriter; import java.io.Writer; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -31,6 +32,8 @@ import org.eclipse.jetty.util.log.Log; */ public class UncheckedPrintWriter extends PrintWriter { + private static final Logger LOG = Log.getLogger(UncheckedPrintWriter.class); + private boolean _autoFlush = false; private boolean _throwUnchecked=true; @@ -105,7 +108,7 @@ public class UncheckedPrintWriter extends PrintWriter setError(); if (_throwUnchecked) throw new RuntimeIOException(th); - Log.debug(th); + LOG.debug(th); } /* ------------------------------------------------------------ */ diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/bio/SocketEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/bio/SocketEndPoint.java index 3c5e81f6572..e9e7d5e00ca 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/bio/SocketEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/bio/SocketEndPoint.java @@ -20,6 +20,7 @@ import java.net.Socket; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /** * @@ -28,6 +29,8 @@ import org.eclipse.jetty.util.log.Log; */ public class SocketEndPoint extends StreamEndPoint { + private static final Logger LOG = Log.getLogger(SocketEndPoint.class); + final Socket _socket; final InetSocketAddress _local; final InetSocketAddress _remote; @@ -230,7 +233,7 @@ public class SocketEndPoint extends StreamEndPoint } catch(IOException e) { - Log.ignore(e); + LOG.ignore(e); _socket.close(); } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java index 934afde9ba9..3a8f2b18fbf 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java @@ -26,6 +26,7 @@ import org.eclipse.jetty.io.Buffer; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; /** * Channel End Point. @@ -34,6 +35,8 @@ import org.eclipse.jetty.util.log.Log; */ public class ChannelEndPoint implements EndPoint { + private static final Logger LOG = Log.getLogger(ChannelEndPoint.class); + protected final ByteChannel _channel; protected final ByteBuffer[] _gather2=new ByteBuffer[2]; protected final Socket _socket; @@ -188,12 +191,12 @@ public class ChannelEndPoint implements EndPoint } catch (IOException xx) { - Log.ignore(xx); + LOG.ignore(xx); } if (len>0) throw x; - Log.ignore(x); + LOG.ignore(x); len=-1; } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/NetworkTrafficSelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/NetworkTrafficSelectChannelEndPoint.java index 1d9226595d3..2f342ae4abb 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/NetworkTrafficSelectChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/NetworkTrafficSelectChannelEndPoint.java @@ -22,9 +22,12 @@ import java.util.List; import org.eclipse.jetty.io.Buffer; import org.eclipse.jetty.io.NetworkTrafficListener; import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint { + private static final Logger LOG = Log.getLogger(NetworkTrafficSelectChannelEndPoint.class); + private final List listeners; public NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key, int maxIdleTime, List listeners) throws IOException @@ -74,7 +77,7 @@ public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint } catch (Exception x) { - Log.warn(x); + LOG.warn(x); } } } @@ -93,7 +96,7 @@ public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint } catch (Exception x) { - Log.warn(x); + LOG.warn(x); } } } @@ -114,7 +117,7 @@ public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint } catch (Exception x) { - Log.warn(x); + LOG.warn(x); } } } @@ -132,7 +135,7 @@ public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint } catch (Exception x) { - Log.warn(x); + LOG.warn(x); } } } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java index 20e417a19f6..751da449985 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java @@ -28,6 +28,7 @@ import org.eclipse.jetty.io.Buffers; import org.eclipse.jetty.io.EofException; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; +import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ /** @@ -41,6 +42,8 @@ import org.eclipse.jetty.util.log.Logger; */ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { + private static final Logger LOG = Log.getLogger(SslSelectChannelEndPoint.class); + public static final Logger __log=Log.getLogger("org.eclipse.jetty.io.nio").getLogger("ssl"); private static final ByteBuffer[] __NO_BUFFERS={}; @@ -247,7 +250,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint catch(SSLException e) { super.close(); - Log.ignore(e); + LOG.ignore(e); } finally { @@ -299,7 +302,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint } catch (Exception x) { - Log.debug(x); + LOG.debug(x); super.close(); } } @@ -440,7 +443,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { case BUFFER_OVERFLOW: case BUFFER_UNDERFLOW: - Log.warn("wrap {}",_result); + LOG.warn("wrap {}",_result); case CLOSED: _closing=true; } @@ -595,7 +598,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { case BUFFER_OVERFLOW: case BUFFER_UNDERFLOW: - Log.warn("unwrap {}",_result); + LOG.warn("unwrap {}",_result); case CLOSED: _closing=true; } @@ -656,7 +659,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { if (_handshook && !_allowRenegotiate && _channel!=null && _channel.isOpen()) { - Log.warn("SSL renegotiate denied: "+_channel); + LOG.warn("SSL renegotiate denied: "+_channel); super.close(); } } @@ -760,7 +763,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint } catch(SSLException e) { - Log.warn(getRemoteAddr() + ":" + getRemotePort() + " " + e); + LOG.warn(getRemoteAddr() + ":" + getRemotePort() + " " + e); freeOutBuffer(); super.close(); throw e; @@ -784,7 +787,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint // If we are closed, we will never get more, so EOF // else return and we will be tried again // later when more data arriving causes another dispatch. - if (Log.isDebugEnabled()) Log.debug("unwrap {}",_result); + if (LOG.isDebugEnabled()) LOG.debug("unwrap {}",_result); if(!isOpen()) { _inNIOBuffer.clear(); @@ -802,7 +805,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint // return true is some bytes somewhere were moved about. return total_filled>0 ||_result.bytesConsumed()>0 || _result.bytesProduced()>0; default: - Log.warn("unwrap "+_result); + LOG.warn("unwrap "+_result); throw new IOException(_result.toString()); } } @@ -854,7 +857,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint } catch(SSLException e) { - Log.warn(getRemoteAddr()+":"+getRemotePort()+" "+e); + LOG.warn(getRemoteAddr()+":"+getRemotePort()+" "+e); super.close(); throw e; } @@ -891,7 +894,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { case BUFFER_OVERFLOW: case BUFFER_UNDERFLOW: - Log.warn("unwrap {}",_result); + LOG.warn("unwrap {}",_result); case OK: return _result.bytesConsumed(); @@ -900,7 +903,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint return _result.bytesConsumed()>0?_result.bytesConsumed():-1; default: - Log.warn("wrap "+_result); + LOG.warn("wrap "+_result); throw new IOException(_result.toString()); } } @@ -935,7 +938,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint } catch(SSLException e) { - Log.warn(getRemoteAddr()+":"+getRemotePort()+" "+e); + LOG.warn(getRemoteAddr()+":"+getRemotePort()+" "+e); super.close(); throw e; } @@ -961,7 +964,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint { case BUFFER_OVERFLOW: case BUFFER_UNDERFLOW: - Log.warn("unwrap {}",_result); + LOG.warn("unwrap {}",_result); case OK: return _result.bytesConsumed(); @@ -970,7 +973,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint return _result.bytesConsumed()>0?_result.bytesConsumed():-1; default: - Log.warn("wrap "+_result); + LOG.warn("wrap "+_result); throw new IOException(_result.toString()); } }