You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/07/01 20:20:19 UTC
[1/2] git commit: Recording .gitmergeinfo Changes
Repository: cxf
Updated Branches:
refs/heads/2.7.x-fixes c296f5069 -> 2b74eea72
Recording .gitmergeinfo Changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2b74eea7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2b74eea7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2b74eea7
Branch: refs/heads/2.7.x-fixes
Commit: 2b74eea72a3c163edc9614cd7db7c83c5884a4d0
Parents: a6d6998
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue Jul 1 14:20:09 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Jul 1 14:20:09 2014 -0400
----------------------------------------------------------------------
.gitmergeinfo | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/2b74eea7/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index badac7a..802ccfa 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -251,6 +251,7 @@ B 341b0f3bb1b7393ec2264fed5aebc10513697182
B 3456770325b97a5754aa655c1de99e33744e694d
B 349a7b61dea339ab3f0f7111d63fd14fd61424fc
B 34b5a3b074090b6ddbcb86948a949a98b43a5749
+B 34c814b641c482864d121452ac7d8fa7ed0a545a
B 350901f443fe4a0b51c6764b61c7f8c69003abae
B 35218f9aae467412e58d6aab071db669169fb589
B 353e4ec70b57983fdee090d831c4bae06a9a6784
@@ -1610,6 +1611,7 @@ M cfda95f21681b4193ca9b8c3c5749b2c067aac15
M d15ad11d6201bf244d9c1a2ea6db333c6eb24e82
M d16e2ea9758eecf8f85830352877904e23bb35d9
M d33c0de10f41e860ef38793784f20172eb3df2c2
+M d40ea830bd7ddd973d9b2b15b42783f30a399790
M d4ccde7ae63eb53e9a93b116236cb84d405013c4
M d5f77ca42144474a00aed49f55b03b2990531237
M d61c528f4802e57514119ac019c9629d7fb0f2d6
[2/2] git commit: Allow -1 for the limit
Posted by dk...@apache.org.
Allow -1 for the limit
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a6d69986
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a6d69986
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a6d69986
Branch: refs/heads/2.7.x-fixes
Commit: a6d699868f6d66f2795852a38662acff2870d20e
Parents: c296f50
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue Jul 1 13:49:34 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Jul 1 14:20:09 2014 -0400
----------------------------------------------------------------------
.../cxf/interceptor/LoggingInInterceptor.java | 6 +++---
.../cxf/interceptor/LoggingOutInterceptor.java | 22 ++++++++++++--------
2 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/a6d69986/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java b/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
index c2ed46d..bf4f531 100644
--- a/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -171,7 +171,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
buffer.getMessage().append("\nMessage (saved to tmp file):\n");
buffer.getMessage().append("Filename: " + writer.getTempFile().getAbsolutePath() + "\n");
}
- if (writer.size() > limit) {
+ if (writer.size() > limit && limit != -1) {
buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
}
writer.writeCacheTo(buffer.getPayload(), limit);
@@ -193,7 +193,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
//only copy up to the limit since that's all we need to log
//we can stream the rest
- IOUtils.copyAtLeast(bis, bos, limit);
+ IOUtils.copyAtLeast(bis, bos, limit == -1 ? Integer.MAX_VALUE : limit);
bos.flush();
bis = new SequenceInputStream(bos.getInputStream(), bis);
@@ -209,7 +209,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
buffer.getMessage().append("\nMessage (saved to tmp file):\n");
buffer.getMessage().append("Filename: " + bos.getTempFile().getAbsolutePath() + "\n");
}
- if (bos.size() > limit) {
+ if (bos.size() > limit && limit != -1) {
buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
}
writePayload(buffer.getPayload(), bos, encoding, ct);
http://git-wip-us.apache.org/repos/asf/cxf/blob/a6d69986/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java b/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
index 2b82cdc..a037c4e 100644
--- a/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
+++ b/api/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
@@ -142,6 +142,7 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
int count;
Logger logger; //NOPMD
Message message;
+ final int lim;
public LogWriter(Logger logger, Message message, Writer writer) {
super(writer);
@@ -150,32 +151,33 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
if (!(writer instanceof StringWriter)) {
out2 = new StringWriter();
}
+ lim = limit == -1 ? Integer.MAX_VALUE : limit;
}
public void write(int c) throws IOException {
super.write(c);
- if (out2 != null && count < limit) {
+ if (out2 != null && count < lim) {
out2.write(c);
}
count++;
}
public void write(char[] cbuf, int off, int len) throws IOException {
super.write(cbuf, off, len);
- if (out2 != null && count < limit) {
+ if (out2 != null && count < lim) {
out2.write(cbuf, off, len);
}
count += len;
}
public void write(String str, int off, int len) throws IOException {
super.write(str, off, len);
- if (out2 != null && count < limit) {
+ if (out2 != null && count < lim) {
out2.write(str, off, len);
}
count += len;
}
public void close() throws IOException {
LoggingMessage buffer = setupBuffer(message);
- if (count >= limit) {
- buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
+ if (count >= lim) {
+ buffer.getMessage().append("(message truncated to " + lim + " bytes)\n");
}
StringWriter w2 = out2;
if (w2 == null) {
@@ -202,11 +204,13 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
private final Message message;
private final OutputStream origStream;
private final Logger logger; //NOPMD
+ private final int lim;
public LoggingCallback(final Logger logger, final Message msg, final OutputStream os) {
this.logger = logger;
this.message = msg;
this.origStream = os;
+ this.lim = limit == -1 ? Integer.MAX_VALUE : limit;
}
public void onFlush(CachedOutputStream cos) {
@@ -225,14 +229,14 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
if (cos.getTempFile() == null) {
//buffer.append("Outbound Message:\n");
- if (cos.size() >= limit) {
- buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
+ if (cos.size() >= lim) {
+ buffer.getMessage().append("(message truncated to " + lim + " bytes)\n");
}
} else {
buffer.getMessage().append("Outbound Message (saved to tmp file):\n");
buffer.getMessage().append("Filename: " + cos.getTempFile().getAbsolutePath() + "\n");
- if (cos.size() >= limit) {
- buffer.getMessage().append("(message truncated to " + limit + " bytes)\n");
+ if (cos.size() >= lim) {
+ buffer.getMessage().append("(message truncated to " + lim + " bytes)\n");
}
}
try {