Howdy,
I don't have time to comment on everything in depth, but a quick comment
on the first issue:

>A problem with logging libraries, is that even if I only use the app
>without needing *any* logging, I still have to include the jar of the
>logging library. And as small as it may be, it's still something I'd
>like to not distribute.

Why are you using the logging the library if you don't need "*any*
logging?"

>Finally, there is the speed issue. As fast as an if.isDebugEnabled()
may
>be, we have seen that some places need a logging statement in a "close
>loop", and this makes performance degrade.

What is a "close loop?"  Can you give an example where a
logger.isDebugEnabled is not possible but logging is still needed?

>  runtime removal of debug statements
>------------------------------------------------------------
>IE: I need to not include all the logging statements in my code
>
>Possible solution: have the class files be preprocessed to remove all
>logging statements.
>
>Sample: the class files are preprocessed by BCEL to remove these method
>calls

Another possible solution is to modify the .java files prior to
compilation as part of the build process.  You can write an Ant task to
do this (the copy task's filtering code does nearly everything you want)
or a perl script, or something else.  I usually prefer this to bytecode
manipulation.

>In this way, if I get a jar that has log4j as a dependency, and I don't
>want to log at all, or use my library, I could run it through the tool
>and have it transparently use my logging or none at all.

This 3rd point is a doozy.

>Comments?

What makes you concerned about this now?  I agree the status quo is not
ideal, but have you run into an insurmountable problem?

Yoav Shapira





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to