You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/02/24 14:38:34 UTC
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
Repository: cxf
Updated Branches:
refs/heads/master b667f5b29 -> a7c94cadc
[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/a7c94cad
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a7c94cad
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a7c94cad
Branch: refs/heads/master
Commit: a7c94cadc10bc960e7f5b9a9d15bdd2ccacb1772
Parents: b667f5b
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Feb 24 14:38:19 2017 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Feb 24 14:38:19 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/a7c94cad/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/a7c94cad/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 c1cc0f0..424e915 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));
}
}