[jboss-jira] [JBoss JIRA] Commented: (JGRP-644) Shared transport: add cluster name to thread name for easier logging

Michael Newcomb (JIRA) jira-events at lists.jboss.org
Mon Apr 21 12:10:44 EDT 2008


    [ http://jira.jboss.com/jira/browse/JGRP-644?page=comments#action_12409831 ] 
            
Michael Newcomb commented on JGRP-644:
--------------------------------------

Suggest using a log for each protocol for each cluster.

Currently:
log = LogFactory.getLog(getClass())

Change to:
OnConnect:
log = LogFactory.getLog(getClass() + "." + <channel_name>) 
OnDisconnect:
log = LogFactory.getLog(getClass()) 

If a typical JChannel stack setup has 'L' number of Log objects, it will now have (N + 1) * L Log objects.

I'm willing to pay this memory price for the increased readability of the logs in a shared-transport / multiple-JChannel environment.

It might be ugly, but perhaps a common flag in Protocol/Transport to have a Log object for each cluster? Then it could check in up/down for the connect/disconnect events and set the Log appropriately?

This would require adding some generic code to Protocol.up/down to handle these events and then going through and ensuring that all subclasses of Protocol call super.up/down, which alot don't, as they just call down_prot.up/down themselves...

Michael

> Shared transport: add cluster name to thread name for easier logging
> --------------------------------------------------------------------
>
>                 Key: JGRP-644
>                 URL: http://jira.jboss.com/jira/browse/JGRP-644
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Bela Ban
>         Assigned To: Bela Ban
>            Priority: Optional
>             Fix For: 2.7, 2.6.3
>
>


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

        



More information about the jboss-jira mailing list