Skip to content

Commit 0dd75d3

Browse files
committed
Use getContextData instead of getContextMap
1 parent f83009b commit 0dd75d3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

server/src/com/mirth/connect/plugins/serverlog/ArrayAppender.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ public void append(LogEvent logEvent) {
3939
String channelId = null;
4040
String channelName = null;
4141

42-
// Check theoretically not necessary, as getContextMap never returns null
43-
// Safety first
44-
if (logEvent.getContextMap() != null) {
45-
channelId = logEvent.getContextMap().getOrDefault("channelId", "");
46-
channelName = logEvent.getContextMap().getOrDefault("channelName", "");
42+
if (logEvent.getContextData() != null) {
43+
channelId = logEvent.getContextData().getValue("channelId");
44+
channelName = logEvent.getContextData().getValue("channelName");
4745
}
4846

4947
String level = String.valueOf(logEvent.getLevel());

0 commit comments

Comments
 (0)