-
Notifications
You must be signed in to change notification settings - Fork 49
Include Channel Name in server log #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
28d08a1
34dbab0
1260098
b42783f
bcee58d
2b555d7
2d118e4
88c452b
790a60e
80e1b2e
74672e6
c28a705
53a85d9
278d2b3
b1623c9
6c5fbc6
9f833e3
a7b0296
9d0946b
d0b358f
b272f5d
6ec3d04
22b0669
f1f1f4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,8 +16,10 @@ | |||||||||
| import java.util.concurrent.Callable; | ||||||||||
|
|
||||||||||
| import org.apache.commons.lang3.StringUtils; | ||||||||||
| import org.apache.logging.log4j.CloseableThreadContext; | ||||||||||
| import org.apache.logging.log4j.LogManager; | ||||||||||
| import org.apache.logging.log4j.Logger; | ||||||||||
| import org.apache.logging.log4j.ThreadContext; | ||||||||||
|
|
||||||||||
| import com.mirth.connect.donkey.model.message.ConnectorMessage; | ||||||||||
| import com.mirth.connect.donkey.model.message.ContentType; | ||||||||||
|
|
@@ -33,11 +35,15 @@ public class DestinationChain implements Callable<List<ConnectorMessage>> { | |||||||||
| private List<Integer> enabledMetaDataIds = new ArrayList<Integer>(); | ||||||||||
| private Logger logger = LogManager.getLogger(getClass()); | ||||||||||
| private String name; | ||||||||||
| private String channelId; | ||||||||||
| private String channelName; | ||||||||||
|
|
||||||||||
| public DestinationChain(DestinationChainProvider chainProvider) { | ||||||||||
| this.chainProvider = chainProvider; | ||||||||||
| enabledMetaDataIds = new ArrayList<Integer>(chainProvider.getMetaDataIds()); | ||||||||||
| name = "Destination Chain Thread on " + chainProvider.getChannelId(); | ||||||||||
| channelId = chainProvider.getChannelId(); | ||||||||||
| channelName = chainProvider.getChannelName(); | ||||||||||
| name = "Destination Chain Thread on " + channelId; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| public void setMessage(ConnectorMessage message) { | ||||||||||
|
|
@@ -59,11 +65,17 @@ public void setName(String name) { | |||||||||
| @Override | ||||||||||
| public List<ConnectorMessage> call() throws InterruptedException { | ||||||||||
| String originalThreadName = Thread.currentThread().getName(); | ||||||||||
| try { | ||||||||||
| Thread.currentThread().setName(name + " < " + originalThreadName); | ||||||||||
| return doCall(); | ||||||||||
| } finally { | ||||||||||
| Thread.currentThread().setName(originalThreadName); | ||||||||||
|
|
||||||||||
| try (CloseableThreadContext.Instance ctc = CloseableThreadContext | ||||||||||
| .put("channelId", channelId) | ||||||||||
| .put("channelName", channelName) | ||||||||||
|
Comment on lines
+70
to
+71
|
||||||||||
| .put("channelId", channelId) | |
| .put("channelName", channelName) | |
| .put("channelId", StringUtils.defaultString(channelId)) | |
| .put("channelName", StringUtils.defaultString(channelName)) |
Uh oh!
There was an error while loading. Please reload this page.