cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7254] Starting a formatted message with the next line char - may be we can replace it with the delimeter later on as with the old feature
Date Fri, 24 Feb 2017 14:39:48 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 99c5d66eb -> 7d3634089


[CXF-7254] Starting a formatted message with the next line char - may be we can replace it
with the delimeter later on as with the old feature


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7d363408
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7d363408
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7d363408

Branch: refs/heads/3.1.x-fixes
Commit: 7d36340898ae91ba91f605313f9b4cbdf3218310
Parents: 99c5d66
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Feb 24 14:38:19 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Feb 24 14:39:32 2017 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/ext/logging/event/LogMessageFormatter.java     | 3 +++
 .../org/apache/cxf/ext/logging/event/PrintWriterEventSender.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7d363408/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogMessageFormatter.java
----------------------------------------------------------------------
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogMessageFormatter.java
b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogMessageFormatter.java
index a6491d7..22ed7a5 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogMessageFormatter.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/LogMessageFormatter.java
@@ -33,6 +33,9 @@ public final class LogMessageFormatter {
     
     public static String format(LogEvent event) {
         StringBuilder b = new StringBuilder();
+        // Start from the next line to have the output well-aligned
+        b.append('\n');
+        
         write(b, "Type", event.getType().toString());
         write(b, "Address", event.getAddress());
         write(b, "HttpMethod", event.getHttpMethod());

http://git-wip-us.apache.org/repos/asf/cxf/blob/7d363408/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrintWriterEventSender.java
----------------------------------------------------------------------
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrintWriterEventSender.java
b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrintWriterEventSender.java
index 1242cda..efaf793 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrintWriterEventSender.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrintWriterEventSender.java
@@ -36,7 +36,7 @@ public class PrintWriterEventSender implements LogEventSender {
     @Override
     public void send(LogEvent event) {
         synchronized (writer) {
-            writer.println(Instant.now().toString() + " - PrintWriterEventSender");
+            writer.print(Instant.now().toString() + " - PrintWriterEventSender");
             writer.print(LogMessageFormatter.format(event));
         }
     }


Mime
View raw message