Am Freitag, den 09.11.2007, 07:48 +0000 schrieb [EMAIL PROTECTED]: > Modified: > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java > URL: > http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java?rev=593444&r1=593443&r2=593444&view=diff > ============================================================================== > --- > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java > (original) > +++ > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java > Thu Nov 8 23:48:19 2007 > @@ -37,16 +37,29 @@ > public class LoggingInInterceptor extends AbstractPhaseInterceptor<Message> { > > private static final Logger LOG = > LogUtils.getL7dLogger(LoggingInInterceptor.class); > + private final LoggingMessage buffer = new LoggingMessage("Inbound > Message\n----------------------------"); > > private int limit = 100 * 1024; > + private boolean enabled;
While it may be that "enabled" will be false by default, it is usually better for readability to initialize that explicitly. The reader is never sure if "false" was the coder's intent, or that they simply forgot to initialize this variable. > Modified: > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java > URL: > http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java?rev=593444&r1=593443&r2=593444&view=diff > ============================================================================== > --- > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java > (original) > +++ > incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java > Thu Nov 8 23:48:19 2007 > @@ -37,18 +37,24 @@ > > + public LoggingMessage getBuffer() { > + return this.buffer; > + } > > public void handleMessage(Message message) throws Fault { > final OutputStream os = message.getContent(OutputStream.class); > if (os == null) { > return; > } > - if (!LOG.isLoggable(Level.INFO)) { > - return; > + > + if (LOG.isLoggable(Level.INFO) || enabled) { && enabled ? Regards, Glen
