On 8/17/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote: > Trustin. > > I like the idea, but I guess some people (like me) use the IoSession for > logging the remote address. > And I guess codec implementations will still depend on mina because of > ProtocolDecoderOutput, right ?
Yeah, I agree with you and that's why I am asking if there's any use cases. :) ProtocolDecoderOutput and ProtocolEncoderOutput also doesn't have any dependency on IoSession or any other MINA interfaces, so protocol implementors will be enough with ProtocolEncoder, ProtocolDecoder, ProtocolEncoderOutput and ProtocolDecoderOutput. > About logging, I guess slf4j does not have something as log4j's NDC concept > ? > I have an IoFilter that pushes the remote address in the NDC before > propagating the event and pops it afterwards. > Very handy, because all logging events down the call stack will contain the > remote address, without depending on mina's > SessionLog. SLF4J doesn't support NDC, but at least it supports MDC: http://www.slf4j.org/api/org/slf4j/MDC.html IIUC, MDC or NDC should be used for purely diagnostic purpose, so I guess we need to provide a Map to the codec anyway. WDYT? Actually I have never tried this kind of feature and that's why I was trying to create a new Logger class that decorates message output. If we can utilize MDC, we might not need log message decoration at all. What was your experience? Thanks, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
