+1  I really like what Seam is doing.  As soon as Velocity moves to
jdk5, you can bet we'll be doing much the same.

And yeah, it really only takes a few simple classes to have a much
nicer interface than j.u.logging.   For Velocity, we basically have
two classes (Log and LogManager) and an interface (LogChute), then the
rest are all just very simple LogChute implementations to j.u.logging,
clogging and such.  Adding the ability to use varargs to streamline
things as Seam and Stripes are doing would definitely make it
worthwhile to implement this, IMHO.

On 8/22/06, Don Brown <[EMAIL PROTECTED]> wrote:
I think a couple extra classes is worth switching from this:

public Order createOrder(User user, Product product, int quantity) {
    if ( log.isLoggable(Level.FINE) ) {
        log.fine("Creating new order for user: " + user.username() +
            " product: " + product.name()
            + " quantity: " + quantity);
    }
    return new Order(user, product, quantity);
}

to this:

public Order createOrder(User user, Product product, int quantity) {
    log.debug("Creating new order for user: #0 product: #1 quantity: #2", 
user.username(), product.name(), quantity);
    return new Order(user, product, quantity);
}


Considering how often we log things, I think the cleanup is huge and a
few classes are definitely worth the price.

Don

Bob Lee wrote:
> On 8/22/06, Don Brown <[EMAIL PROTECTED]> wrote:
>>
>> Well, for one, we only really need one logging instance for the whole
>> library.  Second, and admittedly this is subjective, the
>> java.util.logging API is a horribly designed, obtuse API.  I'd rather
>> see us write a small, clean API along the lines of Seam's logging class
>> that utilizes varargs to reduce the need for isDebugEnabled().
>
>
> I agree that j.u.logging is a PoS, but it's ubiquitous, and for our
> purposes, it workds fine. We may only need one logger for the whole
> framework, but it's just as easy to create a logger per class, and you
> can
> still configure them all at once. I'd rather fix j.u.logging than
> build yet
> another API.
>
> Bob
>


---------------------------------------------------------------------
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]

Reply via email to