about author

Previous | Next Entry

November 11, 2002

alek blogs

insane blabbering without spelling (*)

one of dream J* features already provided by minilogger

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



This blog is about:
XML, Java, and everything else (or nothing ..)

Find more about
blog author

Blogroll:
Sam Ruby
Russell Beattie
Diego Doval
Joel on Software
and some (almost) harmless entertainment: The BileBlog

Projects::
MicroLogger
Xydra
WSIF
XmlPull API
XPP3/MXP1
XSOAP
XMessages

RSS RSS 0.92
0.92 [validate]
2.0 [validate]

Filter Entries:
Life Category Specific RSS Feed
Java Category Specific RSS Feed
XML Category Specific RSS Feed
Computing Category Specific RSS Feed
Web Services Category Specific RSS Feed


Valid XHTML 1.0!


Powered by microBlog (C) Aleksander Slominski

Disclaimer: personal opinions and observations that may or may not be taken seriously, or even based on shared reality and generally are very unreliable and personal and snapshots of volatile writer mind ...

NOTE: THIS PAGE IS UNDER CONSTANT DEVELOPEMENT