cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: New log formatter
Date Tue, 24 Jul 2001 12:07:47 GMT

Stuart Roebuck a écrit :
> Any thoughts on the performance penalties of extra log functionality like
> this?  I suspect the class feature (nice as it is) may be doing quite a
> lot of extra work.
I didn't measure it, but it should cause no harm. Here's how it works :

- first of all, formatting occurs only when an event is logged.
Otherwhise, the extra cost is only adding the environment (an HashMap)
on top of LogKit's context stack (a java.util.Stack) for each request.

- if (and only if) formatting occurs, the class is found by calling a
native method in SecurityManager that returns the call stack as an array
of classes. This method is, I think, heavily used by security policies
each time a permission is checked by the JVM.

- once we have the class array, we iterate on its elements until we find
one that implements Logger. The caller is the previous item in the
array. Et voila !

> Stuart.

Sylvain Wallez
Anyware Technologies -

To unsubscribe, e-mail:
For additional commands, email:

View raw message