You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/24 12:50:35 UTC
[3/9] camel git commit: CamelLogger should only call log with marker
if marker is not null.
CamelLogger should only call log with marker if marker is not null.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d53e31d1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d53e31d1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d53e31d1
Branch: refs/heads/master
Commit: d53e31d1b2842acaf00d09b59495de86f3fc1cdc
Parents: 0bb82e1
Author: Claus Ibsen <da...@apache.org>
Authored: Sun Jan 24 12:25:34 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Jan 24 12:25:34 2016 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/util/CamelLogger.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d53e31d1/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java b/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
index 65b9683..602e062 100644
--- a/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
+++ b/camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
@@ -169,6 +169,11 @@ public class CamelLogger {
}
public static void log(Logger log, LoggingLevel level, Marker marker, String message) {
+ if (marker == null) {
+ log(log, level, message);
+ }
+
+ // marker must be provided
switch (level) {
case DEBUG:
log.debug(marker, message);
@@ -211,6 +216,11 @@ public class CamelLogger {
}
public static void log(Logger log, LoggingLevel level, Marker marker, String message, Throwable th) {
+ if (marker == null) {
+ log(log, level, message, th);
+ }
+
+ // marker must be provided
switch (level) {
case DEBUG:
log.debug(marker, message, th);