Supports null return values from AbstractWS#getRemoteIdentifier() in WS log messages
This commit is contained in:
parent
ff954a3903
commit
0453a72587
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user