From a186d6a09dc18cb340d6031b3c90b70d8464efcd Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Thu, 22 Nov 2012 16:02:56 -0600 Subject: [PATCH] LoggerOutputStream: Trimmed extra newlines before logging. --- src/main/com/jdbernard/slf4j/LoggerOutputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/com/jdbernard/slf4j/LoggerOutputStream.java b/src/main/com/jdbernard/slf4j/LoggerOutputStream.java index 83e0750..c00abe4 100644 --- a/src/main/com/jdbernard/slf4j/LoggerOutputStream.java +++ b/src/main/com/jdbernard/slf4j/LoggerOutputStream.java @@ -68,7 +68,7 @@ public class LoggerOutputStream extends OutputStream { final byte[] messageBytes = new byte[count]; System.arraycopy(buffer, 0, messageBytes, 0, count); - final String message = new String(messageBytes); + final String message = new String(messageBytes).trim(); synchronized(logger) { switch (level) { default: