Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.8k views
in Java FTP by (820 points)
So I'm trying to use Log4j's Nested Diagnostic Context (NDC, http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/NDC.html), but it acts on a per-thread basis. When I operate at higher logging levels, since edtFTPj/PRO starts multiple threads, those additional threads don't inherit the NDC I set. Is there any way to have these threads automatically set this? Or any way to provide a custom ThreadFactory in order to create Thread's which set the NDC I want?

2 Answers

0 votes
by (162k points)
No, I don't think you can do this.
0 votes
by (820 points)
Could this be a feature (thread startup hook, or a specific NDC startup hook) feature in a future version? What we're really trying to do is positively identify what logging messages in the log file come from different parts of the application, and since we will have multiple SecureFileTransferClient connected to separate FTP/SFTP servers, we'd like to easily tell which one is outputting which log messages.

Categories

...