Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

AaronB

Posts

22

Joined

Sat Feb 05, 2011 11:28 am

Log4j NDC and SecureFileTransferClient

by AaronB » Tue May 10, 2011 4:32 am

So I'm trying to use Log4j's Nested Diagnostic Context (NDC, ), 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?
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Log4j NDC and SecureFileTransferClient

by support2 » Tue May 10, 2011 9:38 am

No, I don't think you can do this.
no avatar
User

AaronB

Posts

22

Joined

Sat Feb 05, 2011 11:28 am

by AaronB » Tue May 10, 2011 9:41 am

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.

Who is online

Users browsing this forum: No registered users and 96 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign