You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/05/16 04:21:16 UTC

[jira] Created: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Fine-grained logging control in LoggingFilter
---------------------------------------------

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


LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:

* disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
* log only certain type of received messages

Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

-- 
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-376) Fine-grained logging control in LoggingFilter

Posted by Mark <el...@gmail.com>.
I was looking into whether or not I should clone, or just pass the existing
Map into the constructor of a new Map.  Looking at the constructor and
clone(), I was torn between which is the preferred method.  I guess now I
know :).



On 8/17/07, Trustin Lee <tr...@gmail.com> wrote:
>
> I made the necessary changes by myself; I had some free time. :)
>
> Please review the changes.
>
> Cheers,
> Trustin
>
> On 8/17/07, Trustin Lee <tr...@gmail.com> wrote:
> > On 8/17/07, Mark <el...@gmail.com> wrote:
> > > Just getting around to looking at this again.  I have checked in my
> latest
> > > version of CopyOnWriteMap to org.apache.mina.util in the trunk.  I
> have
> > > tested the class using ConTest from IBM and all seems to go well.  Let
> me
> > > know what you think, and if all is well I can begin to incorporate the
> class
> > > into parts of the trunk.
> >
> > It looks very good.  I made a few small changes, but nothing has been
> > changed essentially.  Great work!
> >
> > Let's make logging filter to utilize it.
> >
> > Cheers,
> > Trustin
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> > --
> > PGP Key ID: 0x0255ECA6
> >
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>



-- 
..Cheers
Mark

Re: [jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Posted by Trustin Lee <tr...@gmail.com>.
I made the necessary changes by myself; I had some free time. :)

Please review the changes.

Cheers,
Trustin

On 8/17/07, Trustin Lee <tr...@gmail.com> wrote:
> On 8/17/07, Mark <el...@gmail.com> wrote:
> > Just getting around to looking at this again.  I have checked in my latest
> > version of CopyOnWriteMap to org.apache.mina.util in the trunk.  I have
> > tested the class using ConTest from IBM and all seems to go well.  Let me
> > know what you think, and if all is well I can begin to incorporate the class
> > into parts of the trunk.
>
> It looks very good.  I made a few small changes, but nothing has been
> changed essentially.  Great work!
>
> Let's make logging filter to utilize it.
>
> Cheers,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: [jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Posted by Trustin Lee <tr...@gmail.com>.
On 8/17/07, Mark <el...@gmail.com> wrote:
> Just getting around to looking at this again.  I have checked in my latest
> version of CopyOnWriteMap to org.apache.mina.util in the trunk.  I have
> tested the class using ConTest from IBM and all seems to go well.  Let me
> know what you think, and if all is well I can begin to incorporate the class
> into parts of the trunk.

It looks very good.  I made a few small changes, but nothing has been
changed essentially.  Great work!

Let's make logging filter to utilize it.

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: [jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Posted by Mark <el...@gmail.com>.
Just getting around to looking at this again.  I have checked in my latest
version of CopyOnWriteMap to org.apache.mina.util in the trunk.  I have
tested the class using ConTest from IBM and all seems to go well.  Let me
know what you think, and if all is well I can begin to incorporate the class
into parts of the trunk.

Thanks.


On 7/24/07, Trustin Lee (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515142]
>
> Trustin Lee commented on DIRMINA-376:
> -------------------------------------
>
> The implementation looks somewhat weird.  It's modifying the map before
> creating a new copy.  And if we are going to use a ConcurrentHashMap, we
> won't even need to make a copy of it.  I found an existing implementation
> that might help you in Commons Collections:
>
>
> http://jakarta.apache.org/commons/collections/api-release/org/apache/commons/collections/FastHashMap.html
>
> Source code:
>
> http://www.krugle.com/kse/codespaces/EPwm08
>
> > Fine-grained logging control in LoggingFilter
> > ---------------------------------------------
> >
> >                 Key: DIRMINA-376
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
> >             Project: MINA
> >          Issue Type: New Feature
> >          Components: Filter
> >            Reporter: Trustin Lee
> >            Assignee: Mark Webb
> >            Priority: Minor
> >             Fix For: 2.0.0-M1
> >
> >
> > LoggingFilter of MINA 1.0 has limited usability because there's no way
> to disable certain log messages.  For example, you can't:
> > * disable logging for certain event type (e.g. exceptionCaught, which is
> often logged again in IoHandler.exceptionCaught()).
> > * log only certain type of received messages
> > Category filtering feature provided by logging frameworks will solve
> this problem somewhat, but it's very coarse-grained and won't work as
> expected because LoggingFilter gets the logger instance using the IoHandler
> implementation class and therefore affect logging messages in an IoHandler
> implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
..Cheers
Mark

Re: [jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Posted by Mark Webb <el...@gmail.com>.
Thanks for the feedback!  The best part about this class (to me) is that it
stores nothing in the session, which after seeing all of the OOM discussion
on the mailing list means alot.

Comments to your comments ;)
1. fixed.
2. fixed.
3. I need to find this class somewhere.  Seems to me that this was discussed
in the Java Concurrency In Practice.  I left my copy at work and will look
at it in the morning.
4. fixed.

Trustin, do you recommend I check this in to the trunk and overwrite the
current version of LoggingFilter once I fix what you commented on?

On 7/23/07, Trustin Lee (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514829]
>
> Trustin Lee commented on DIRMINA-376:
> -------------------------------------
>
> A few comments:
>
> 1) Tabs and spaces are mixed.  Spaces are always preferred.
> 2) logSettings could be final.
> 3) logSettings could be something like CopyOnWriteMap for maximum
> concurrency.  CopyOnWriteMap doesn't exist in JDK, so we could provide it in
> org.apache.mina.util.  Or it might be included in commons-collections?
> 4) Let's add setLogLevel(IoEventType, LogLevel) and change all set<event
> name>LogLevel methods to call setLogLevel().
>
> Except them, I love the implementation!  Great work!
>
> > Fine-grained logging control in LoggingFilter
> > ---------------------------------------------
> >
> >                 Key: DIRMINA-376
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
> >             Project: MINA
> >          Issue Type: New Feature
> >          Components: Filter
> >            Reporter: Trustin Lee
> >            Priority: Minor
> >             Fix For: 2.0.0-M1
> >
> >
> > LoggingFilter of MINA 1.0 has limited usability because there's no way
> to disable certain log messages.  For example, you can't:
> > * disable logging for certain event type (e.g. exceptionCaught, which is
> often logged again in IoHandler.exceptionCaught()).
> > * log only certain type of received messages
> > Category filtering feature provided by logging frameworks will solve
> this problem somewhat, but it's very coarse-grained and won't work as
> expected because LoggingFilter gets the logger instance using the IoHandler
> implementation class and therefore affect logging messages in an IoHandler
> implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
..Cheers
Mark

Re: [jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

Posted by Mark Webb <el...@gmail.com>.
I have written a new version of the LoggingFilter.  I think that the new
version will provide better configurability.  Here is the link to the file:

http://www.markwebb.org/mina/MarksLoggingFilter.java

Let me know what you think...


On 7/15/07, Trustin Lee (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRMINA-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512850]
>
> Trustin Lee commented on DIRMINA-376:
> -------------------------------------
>
> I added IoEventType enum recently, so we could simply use
> EnumSet<IoEventType> like I did in AbstractExecutorFilter.  Besides
> specifying the set of event types, users also need to specify the log level
> of each event type.
>
> > Fine-grained logging control in LoggingFilter
> > ---------------------------------------------
> >
> >                 Key: DIRMINA-376
> >                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
> >             Project: MINA
> >          Issue Type: New Feature
> >          Components: Filter
> >            Reporter: Trustin Lee
> >            Priority: Minor
> >             Fix For: 2.0.0-M1
> >
> >
> > LoggingFilter of MINA 1.0 has limited usability because there's no way
> to disable certain log messages.  For example, you can't:
> > * disable logging for certain event type (e.g. exceptionCaught, which is
> often logged again in IoHandler.exceptionCaught()).
> > * log only certain type of received messages
> > Category filtering feature provided by logging frameworks will solve
> this problem somewhat, but it's very coarse-grained and won't work as
> expected because LoggingFilter gets the logger instance using the IoHandler
> implementation class and therefore affect logging messages in an IoHandler
> implementation.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
..Cheers
Mark

[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Mark Webb commented on DIRMINA-376:
-----------------------------------

I am going to check in this code, and use the Collections.synchronizedMap(Map<V,K>) method for creating the java.util.Map that holds the settings.  I will open a new JIRA entry for adding a CopyOnWriteMap and CopyOnReadMap.  This way the new LoggingFilter can begin the review process by other developers.



> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Mark Webb commented on DIRMINA-376:
-----------------------------------

Not sure yet, but I thought that if we write a CopyOnWriteMap, we should have a matching CopyOnReadMap.  I will investigate this further and let you know.



> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Mark Webb commented on DIRMINA-376:
-----------------------------------

Here is a first shot at a CopyOnWriteMap.  

https://svn.apache.org/repos/asf/mina/sandbox/mwebb/mina/src/main/java/org/apache/mina/util/CopyOnWriteMap.java


> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Assignee: Mark Webb
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

Mark wrote:

I have written a new version of the LoggingFilter.  I think that the new
version will provide better configurability.  Here is the link to the file:

http://www.markwebb.org/mina/MarksLoggingFilter.java

Let me know what you think...

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

I added IoEventType enum recently, so we could simply use EnumSet<IoEventType> like I did in AbstractExecutorFilter.  Besides specifying the set of event types, users also need to specify the log level of each event type.

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Mark Webb commented on DIRMINA-376:
-----------------------------------

What about a system similar to the ProfilerTimerFilter where you can bitmask the methods that you want to have support logging.  This will allow the developer to determine which methods they want to generate logs.



> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Assigned: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Mark Webb reassigned DIRMINA-376:
---------------------------------

    Assignee: Mark Webb

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Assignee: Mark Webb
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

The implementation looks somewhat weird.  It's modifying the map before creating a new copy.  And if we are going to use a ConcurrentHashMap, we won't even need to make a copy of it.  I found an existing implementation that might help you in Commons Collections:

http://jakarta.apache.org/commons/collections/api-release/org/apache/commons/collections/FastHashMap.html

Source code:

http://www.krugle.com/kse/codespaces/EPwm08

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Assignee: Mark Webb
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

Mark wrote:  (All comments should be written here, instead of replying to the JIRA notification message directly.)

Thanks for the feedback!  The best part about this class (to me) is that it
stores nothing in the session, which after seeing all of the OOM discussion
on the mailing list means alot.

Comments to your comments ;)
1. fixed.
2. fixed.
3. I need to find this class somewhere.  Seems to me that this was discussed
in the Java Concurrency In Practice.  I left my copy at work and will look
at it in the morning.
4. fixed.

Trustin, do you recommend I check this in to the trunk and overwrite the
current version of LoggingFilter once I fix what you commented on?

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

Sure.  Please go ahead!

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

A few comments:

1) Tabs and spaces are mixed.  Spaces are always preferred.
2) logSettings could be final.
3) logSettings could be something like CopyOnWriteMap for maximum concurrency.  CopyOnWriteMap doesn't exist in JDK, so we could provide it in org.apache.mina.util.  Or it might be included in commons-collections?
4) Let's add setLogLevel(IoEventType, LogLevel) and change all set<event name>LogLevel methods to call setLogLevel().

Except them, I love the implementation!  Great work!

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Closed: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee closed DIRMINA-376.
-------------------------------

    Resolution: Fixed

The new filter looks great to me.  Great job Mark!  It's time to close. :)

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Assignee: Mark Webb
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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


[jira] Commented: (DIRMINA-376) Fine-grained logging control in LoggingFilter

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

Trustin Lee commented on DIRMINA-376:
-------------------------------------

Great.  BTW what is the use case of CopyOnReadMap?

> Fine-grained logging control in LoggingFilter
> ---------------------------------------------
>
>                 Key: DIRMINA-376
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-376
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter
>            Reporter: Trustin Lee
>            Priority: Minor
>             Fix For: 2.0.0-M1
>
>
> LoggingFilter of MINA 1.0 has limited usability because there's no way to disable certain log messages.  For example, you can't:
> * disable logging for certain event type (e.g. exceptionCaught, which is often logged again in IoHandler.exceptionCaught()).
> * log only certain type of received messages
> Category filtering feature provided by logging frameworks will solve this problem somewhat, but it's very coarse-grained and won't work as expected because LoggingFilter gets the logger instance using the IoHandler implementation class and therefore affect logging messages in an IoHandler implementation.

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