You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Maarten Bosteels (JIRA)" <ji...@apache.org> on 2007/08/17 16:10:30 UTC

[jira] Created: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

create a new loggingfilter that leverages SLF4J's MDC feauture
--------------------------------------------------------------

                 Key: DIRMINA-422
                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
             Project: MINA
          Issue Type: New Feature
          Components: Filter
            Reporter: Maarten Bosteels
            Priority: Minor
             Fix For: 2.0.0-M1


A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
has the advantage that all logging events down the call stack include this info.

Even if those log events are generated by code that is not aware of MINA at all.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by Maarten Bosteels <mb...@gmail.com>.
Just to let you know that I am working on it. But lots of work right now ...
I agree with all your remarks, but I can't find a proper name for the
WrappingFilter.

Maarten

On 8/22/07, Trustin Lee (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521652]
>
> Trustin Lee commented on DIRMINA-422:
> -------------------------------------
>
> A few comments:
>
> * We could use Runnable instead of introducing FilterAction.
> * Let's make IoFilter methods in WrappingFilter 'final'.
> * Very trivial thing but I'd prefer protected abstract to abstract
> protected.
> * The name 'WrappingFilter' doesn't represent what it does clearly.  What
> would be a better name?  We will also have to change wrapFilterAction to
> something else.
>
> > Depending on the relative position of ExecutorFilter and
> ProtocolCodecFilter
> > more than one MdcLoggingFilter must be added to the chain
> > (when you want the MDC to be set during encoding/decoding).
>
> We could simply change MdcLoggingFilter to MDCInjectionFilter and make it
> perform property injection only, and let LoggingFilter handle logging. (
> i.e. Separation of concern :) WDYT?
>
>
>
> > create a new loggingfilter that leverages SLF4J's MDC feauture
> > --------------------------------------------------------------
> >
> >                 Key: DIRMINA-422
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
> >             Project: MINA
> >          Issue Type: New Feature
> >          Components: Filter
> >            Reporter: Maarten Bosteels
> >            Assignee: Maarten Bosteels
> >            Priority: Minor
> >             Fix For: 2.0.0-M1
> >
> >
> > A logging filter that puts some basic info about the IoSession in the
> MDC (Mapped Diagnostic Context)
> > has the advantage that all logging events down the call stack include
> this info.
> > Even if those log events are generated by code that is not aware of MINA
> at all.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Work stopped: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on DIRMINA-422 stopped by Maarten Bosteels.

> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-422) a new IoFilter that leverages SLF4J's MDC feature

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Bosteels resolved DIRMINA-422.
--------------------------------------

    Resolution: Fixed

Done.

> a new IoFilter that leverages SLF4J's MDC feature
> -------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Bosteels resolved DIRMINA-422.
--------------------------------------

    Resolution: Fixed

Done

> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Bosteels reassigned DIRMINA-422:
----------------------------------------

    Assignee: Maarten Bosteels

> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRMINA-422) a new IoFilter that leverages SLF4J's MDC feature

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Bosteels updated DIRMINA-422:
-------------------------------------

    Summary: a new IoFilter that leverages SLF4J's MDC feature  (was: create a new loggingfilter that leverages SLF4J's MDC feauture)

> a new IoFilter that leverages SLF4J's MDC feature
> -------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on DIRMINA-422 started by Maarten Bosteels.

> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521652 ] 

Trustin Lee commented on DIRMINA-422:
-------------------------------------

A few comments:

* We could use Runnable instead of introducing FilterAction.
* Let's make IoFilter methods in WrappingFilter 'final'.
* Very trivial thing but I'd prefer protected abstract to abstract protected.
* The name 'WrappingFilter' doesn't represent what it does clearly.  What would be a better name?  We will also have to change wrapFilterAction to something else.

> Depending on the relative position of ExecutorFilter and ProtocolCodecFilter
> more than one MdcLoggingFilter must be added to the chain
> (when you want the MDC to be set during encoding/decoding). 

We could simply change MdcLoggingFilter to MDCInjectionFilter and make it perform property injection only, and let LoggingFilter handle logging. (i.e. Separation of concern :) WDYT?



> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-422) a new IoFilter that leverages SLF4J's MDC feature

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527917 ] 

Trustin Lee commented on DIRMINA-422:
-------------------------------------

Nice job!  Please also don't forget to add the license header! :)

> a new IoFilter that leverages SLF4J's MDC feature
> -------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-422) a new IoFilter that leverages SLF4J's MDC feature

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-422.
-------------------------------------


> a new IoFilter that leverages SLF4J's MDC feature
> -------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (DIRMINA-422) create a new loggingfilter that leverages SLF4J's MDC feauture

Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Bosteels reopened DIRMINA-422:
--------------------------------------


I need to check more scenario's.

Depending on the relative position of  ExecutorFilter and ProtocolCodecFilter 
more than one MdcLoggingFilter must be added to the chain
(when you want the MDC to be set during encoding/decoding).

Maybe we need to add a constructor where users can specify which events to wrap:
  MdcLoggingFilter (IoEventType... eventTypes) 



> create a new loggingfilter that leverages SLF4J's MDC feauture
> --------------------------------------------------------------
>
>                 Key: DIRMINA-422
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-422
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Maarten Bosteels
>            Assignee: Maarten Bosteels
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> A logging filter that puts some basic info about the IoSession in the MDC (Mapped Diagnostic Context)
> has the advantage that all logging events down the call stack include this info.
> Even if those log events are generated by code that is not aware of MINA at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.