You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Phan Thanh Hieu (JIRA)" <ji...@apache.org> on 2006/11/02 11:10:18 UTC

[jira] Created: (DIRMINA-300) Enhance log information when using sessionLog

Enhance log information when using sessionLog
---------------------------------------------

                 Key: DIRMINA-300
                 URL: http://issues.apache.org/jira/browse/DIRMINA-300
             Project: Directory MINA
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0
            Reporter: Phan Thanh Hieu
            Priority: Minor


SessionLog should provide the information about LocalAddress and RemoteAddress instead of only RemoteAddress as current. How do you guys think?
I have modified the SessionLog util class attached in this issue.

I have to develop the SessionLogUtil myseft due to i encountered a problem: MINA continues receiving the message when stop listening on Port. 
The kind of added information would help us to detect which port is still received the message.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRMINA-300) Enhance log information when using sessionLog

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

Trustin Lee commented on DIRMINA-300:
-------------------------------------

Would it be a good idea to print out the local address by default?  Do we always need such an information?

If it's a special demand, you could just set your own PREFIX attribute, because it's designed to enable such a runtime modification.

> Enhance log information when using sessionLog
> ---------------------------------------------
>
>                 Key: DIRMINA-300
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-300
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0
>            Reporter: Phan Thanh Hieu
>            Priority: Minor
>         Attachments: SessionLog.java
>
>
> SessionLog should provide the information about LocalAddress and RemoteAddress instead of only RemoteAddress as current. How do you guys think?
> I have modified the SessionLog util class attached in this issue.
> I have to develop the SessionLogUtil myseft due to i encountered a problem: MINA continues receiving the message when stop listening on Port. 
> The kind of added information would help us to detect which port is still received the message.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRMINA-300) Enhance log information when using sessionLog

Posted by "Phan Thanh Hieu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRMINA-300?page=all ]

Phan Thanh Hieu updated DIRMINA-300:
------------------------------------

    Attachment: SessionLog.java

I have changed the SessionLog class:
--BEGIN--
private static Logger getLogger( IoSession session )
    {
        Logger log = ( Logger ) session.getAttribute( LOGGER );
        if( log == null )
        {
            log = LoggerFactory.getLogger( getClass( session ) );
            String prefix = ( String ) session.getAttribute( PREFIX );
            if( prefix == null )
            {
                prefix = "[" + session.getLocalAddress() 
                	+ session.getRemoteAddress() + "] ";
                session.setAttribute( PREFIX, prefix );
            }

            session.setAttribute( LOGGER, log );
        }

        return log;
    }
--END--

> Enhance log information when using sessionLog
> ---------------------------------------------
>
>                 Key: DIRMINA-300
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-300
>             Project: Directory MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0
>            Reporter: Phan Thanh Hieu
>            Priority: Minor
>         Attachments: SessionLog.java
>
>
> SessionLog should provide the information about LocalAddress and RemoteAddress instead of only RemoteAddress as current. How do you guys think?
> I have modified the SessionLog util class attached in this issue.
> I have to develop the SessionLogUtil myseft due to i encountered a problem: MINA continues receiving the message when stop listening on Port. 
> The kind of added information would help us to detect which port is still received the message.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira