You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by cs...@apache.org on 2011/10/28 21:12:47 UTC
svn commit: r1190506 -
/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Author: cschneider
Date: Fri Oct 28 19:12:46 2011
New Revision: 1190506
URL: http://svn.apache.org/viewvc?rev=1190506&view=rev
Log:
CXF-3888 Showing nicer class name and fixing checkstyle
Modified:
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java?rev=1190506&r1=1190505&r2=1190506&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java Fri Oct 28 19:12:46 2011
@@ -24,6 +24,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URI;
import java.util.logging.Level;
+import java.util.logging.LogRecord;
import java.util.logging.Logger;
import javax.xml.transform.OutputKeys;
@@ -170,7 +171,11 @@ public abstract class AbstractLoggingInt
// Flushing the writer to make sure the message is written
writer.flush();
} else if (logger.isLoggable(Level.INFO)) {
- logger.info(message);
+ LogRecord lr = new LogRecord(Level.INFO, message);
+ lr.setSourceClassName(logger.getName());
+ lr.setSourceMethodName(null);
+ lr.setLoggerName(logger.getName());
+ logger.log(lr);
}
}