Thanks. OK, I'll ensure my code only uses 1.3 facilities (my O'Reilly JavaNut is only 1.3 anyway!) [Though I would expect that requirement to have faded somewhat now...]
Not sure what you mean by keeping a hashtable in LoggingManager. Doesn't LogKit return the same logger instance if the same category is used? I guess I need to try it, but if so, there would be no need to keep a hash, unless I've misunderstood what the hash would be for? S. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:14 To: JMeter Developers List Subject: RE: Logging suggestions Yeah, I looked at this briefly and recognized the same problem with the classnames. although 1.8 is dependent on Java 1.4, 1.8.1 is not, and neither is 1.9, and too many have let it be known they want to use Java 1.3, so... Alternatively, these log variables could be instance instead of static vars, and instead, LoggingManager could be smarter and keep a hashtable of Loggers for each class. Just a thought -Mike On 2 Jun 2003 at 14:49, BAZLEY, Sebastian wrote: > I've now experimented with the changes to the logging system. > Before submitting patches etc, may I just confirm that the proposed changes > are OK? > > == > > All relevant files (except LoggingManager.java) are changed as follows: > > import org.apache.log.Hierarchy; > becomes > import org.apache.jorphan.logging.LoggingManager; > (some files already include this line, in which case the original import > just needs to be deleted) > > Hierarchy.getDefaultHierarchy().getLoggerFor( ... > becomes > LoggingManager.getLoggerFor( ... > > I was unable to work out how to find out the enclosing class name > automatically. > Unfortunately all the methods seem to rely on using "this", which is not > available for static initialisation. > > So as a temporary (?) measure, I changed LoggingManager.getLoggerFor() to > ignore the parameter, and use a Throwable and StackTrackElement to retrieve > the calling class name. > > This relies on Java 1.4, but that is currently documented as a requirement > for 1.8. > Hope that is OK - if not, there are (messier) ways to extract the caller > name from the stack. > > It then became clear that the log records and jmeter.properties lines were > becoming rather verbose, so I decided to remove the "org.apache." prefix > from the class name. > > The minimal jmeter.properties configuration is now: > > log_level.jmeter=INFO > log_level.jorphan=INFO > > log_file=jmeter.log > > Any complaints/ further suggestions? > > -- > The opinions expressed herein are my own, and are not necessarily endorsed > by my employer ... > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 AIM: mstover777 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]