mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <akaras...@apache.org>
Subject Re: LoggingFilter
Date Thu, 03 Jul 2008 18:47:19 GMT
You can also add multiple logging filters at different places in the chain
and use a mask to control what each logs.  This stuff is so trivial that
extension also works too.

HTH,
Alex

On Thu, Jul 3, 2008 at 1:16 PM, Sergey Mamitko <smam@isd.dp.ua> wrote:

> Hello,
>
> I have some protocol filter and I need to print incoming and outgoing data.
> That's why I added org.apache.mina.filter.LoggingFilter after my protocol
> filter.
> It correctly prints data encoded by my protocol during send operation (with
> prefix and suffix for example).
> But when I receive data they printed without extra information because it
> was extracted by protocol.
>
> And question is how to print completely incoming and outgoing data.
>
> At the moment I have one idea:
> extend LoggingFilter and overwrite method messageSend (just delegate call
> to next filter) and set it BEFORE my protocol and
> extend LoggingFilter and overwrite method messageReceived (just delegate
> call to next filter) and set it AFTER my protocol
>
> What do you think about it?
>
> -------------------------
> Sergey Mamitko
> ISD, http://www.isd.dp.ua/index.html.en
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message