logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Muller" <...@online.no>
Subject RE: trace for inner classes
Date Tue, 06 Aug 2002 08:56:08 GMT
If you don't like the suggested approach, you can alternatively patch the
Logger::getLogger( String name ) method:

static public Logger getLogger( String name ) {
	return LogManager.getLogger( name.replace( '$', '.' ) );
}

--

Thomas


 | -----Original Message-----
 | From: Herve AGNOUX [mailto:herve.agnoux@diaam-informatique.com]
 | Sent: 06 August 2002 09:14
 | To: Log4J Users List
 | Subject: RE: trace for inner classes
 |
 |
 | Le 5 Aug 2002 Thomas Muller a ├ęcrit :
 |
 | >
 | > What about doing
 | >
 | >  Logger.getLogger( getClass().getName().replace( '$', '.' ) )
 | >
 | > for inner classes?
 | >
 |
 | Yes, but I think it's not very elegant. I think that when the logger is
 | determinated by a class, the logger hierarchy must follow the
 | class hierarchy.
 |
 | Anyway, I shall do "replace('$', '.'), thank you for your help.
 |
 |
 | --
 | To unsubscribe, e-mail:
 | <mailto:log4j-user-unsubscribe@jakarta.apache.org>
 | For additional commands, e-mail:
 | <mailto:log4j-user-help@jakarta.apache.org>
 |
 |



*************************************************************************
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this email should be treated in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message