The Artima Developer Community
Sponsored Link

Java Buzz Forum
one of dream J* features already provided by minilogger

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Aleksander Slominski

Posts: 51
Nickname: aslom
Registered: May, 2003

Aleksander Slominski is a Ph.D. student at Indiana University working on components, XML, and grids.
one of dream J* features already provided by minilogger Posted: Jul 17, 2003 12:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Aleksander Slominski.
Original Post: one of dream J* features already provided by minilogger
Feed Title: alek blogs java
Feed URL: http://www.extreme.indiana.edu/~aslom/blog/java/index.xml
Feed Description: discovering limits of programming
Latest Java Buzz Posts
Latest Java Buzz Posts by Aleksander Slominski
Latest Posts From alek blogs java

Advertisement
in James Strachan blog he writes about features to add to Java to compete with C# including thisClass and uses example of Logger:

A constant for the current class instance

We have this but why not a thisClass?

Its a PITA to have to cut and paste class names when they could easily be a compile time constant. e.g.

public class Foo {
    private Logger log = LogFactory.getLog( thisClass );

instead of

    private Logger log = LogFactory.getLog( Foo.class );

which can lead to cut-and-paste errors. This is a common issue with using static methods in a generic way.

This is a very trivial change.

and this is already solved by minilogger where you can write
    private Logger log = LogFactory.getLog();
and miniLogger can do it now: it will guess current thisClass from context. without changes to language to have thisClass

Read: one of dream J* features already provided by minilogger

Topic: Spring Framework reaches wider audience Previous Topic   Next Topic Topic: Re: Another ignorant discussion on .Net is 'better' than Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use