diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java index 9a460d8395c..464ed52d1df 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/JavaUtilLog.java @@ -126,8 +126,11 @@ public class JavaUtilLog implements Logger if (bracesIndex < 0) { builder.append(msg.substring(start)); - builder.append(" "); - builder.append(String.valueOf(arg)); + if (arg != null) + { + builder.append(" "); + builder.append(arg); + } start = msg.length(); } else diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java b/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java index ef901dcbee4..7608dd91641 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/log/StdErrLog.java @@ -197,8 +197,11 @@ public class StdErrLog implements Logger if (bracesIndex < 0) { escape(builder, msg.substring(start)); - builder.append(" "); - builder.append(String.valueOf(arg)); + if (arg != null) + { + builder.append(" "); + builder.append(arg); + } start = msg.length(); } else