At 11:43 22.02.2001 -0800, Scruffles - wrote:
>Wow! I just got done going through the source code.
>I wouldn't have never thought of that. I guess when
>they said it would be slow, I just assumed reflection.
> It never even occured to me that there isn't really a
>way to get that kind of information from reflection.
>
>Does anyone know if Sun's JSR47 will allow a better
>way of getting this information (maybe from the VM)?
>
>I assume any solution created by Sun would quickly be
>integrated into Log4J
I think it's the other way around: any solution created by log4j will eventually be
integrated into java.util.logging. :-)
The keyword here is "eventually". The people at Sun are doing a very effective job at
copying other peoples ideas. I call it Sun's "copy and conquer" model. They have done
it with JCE, the Java Collection API and who knows what else. I expect people
developing Java infrastructure to eventually realize that the JCP is just a fig leaf
but I am not holding my breath.
Coming back to the issue, Luc is right. My tests show that logging method, line or
file information (localization) is about 40 to 50 times slower than logging without
localization. Fortunately, localization can be very easily turned on or off. Cheers,
Ceki
>--- Luke Blanshard <[EMAIL PROTECTED]> wrote:
>> I don't believe reflection has anything to do with
>> it. My understanding is that it
>> generates a stack trace, and figures out the method
>> name from that. This means that
>> every (executed) log statement causes the creation
>> of an exception (which is how stack
>> traces are generated). I imagine that this would
>> slow things down somewhat, or maybe a
>> lot, but I haven't actually tried it.
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
----
Ceki Gülcü Web: http://qos.ch
av. de Rumine 5 email: [EMAIL PROTECTED] (preferred)
CH-1005 Lausanne [EMAIL PROTECTED]
Switzerland Tel: ++41 21 351 23 15
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]