Niklas Gustavsson wrote: > Dave Roberts wrote: >> Just wondering: where do we go from here? > > My plan is to enable MDC by default (using the MDC filter that MINA > provides). This will give you the possibility of logging for example to > client IP or user name. I've played around some with this and it's real > sweet. Have a look at the core unit test as they use MDC for logging, > does that cover your needs?
It certainly appears to exceed my expectations. :-) It looks like each session logger has it's own thread (e.g. NioProcessor-2), even though the sessions themselves have a shared thread (e.g. pool-1-thread-2). So in this case, the MDC attributes are unique for each session, which helps. So, will all LOG writes (e.g. PASS.java:215) be replaced with this new logging functionality? If so, can we also expose the FtpIoSession to things like the FileSystemManager, FileSystemView and FileSystemObject, as well as the Ftplet implementations, such that other implementations can make use of the logging as well. In terms of the information stored in the MDC attributes, I think we'd benefit from something unique, like the client host _and_ client port, or a hex version of the connection timestamp.
