diff --git a/pandalib-ws/src/main/java/fr/pandacube/lib/ws/AbstractWS.java b/pandalib-ws/src/main/java/fr/pandacube/lib/ws/AbstractWS.java index 4067d12..eff2c1f 100644 --- a/pandalib-ws/src/main/java/fr/pandacube/lib/ws/AbstractWS.java +++ b/pandalib-ws/src/main/java/fr/pandacube/lib/ws/AbstractWS.java @@ -275,6 +275,12 @@ public interface AbstractWS { String getRemoteIdentifier(); private String formatLogMessage(String message) { - return "[WS/" + getClass().getSimpleName() + "] [" + getRemoteIdentifier() + "] " + message; + String remote = getRemoteIdentifier(); + String fullText = "[WS/" + getClass().getSimpleName() + "]"; + if (remote != null) { + fullText += " [" + remote + "]"; + } + fullText += message; + return fullText; } }