On Dec 1, 5:36 am, Juergen Gmeiner <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am toying around with a logging wrapper for log4j that will fall
> back on java.util.logging when log4j is not present in the classpath.
>
> Currently, I have 2 implementation libararies gjdv.logging.log4j and
> gjdv.logging.javalog that wrap the corresponding java libraries.
> I have a 3rd library gjdv.logging that checks if log4j is in the
> classpath, uses the appropriate library and then defines the final
> macros.
>
> It works, but AOT compilation & removal of log4j.jar from the
> classpath breaks the fallback (i.e. I get an error message that
> log4j is not found instead of transparently using java.util.logging).
>
> I also tried different approaches. The in-one-library approach was
> unwieldy because if a class is not present normal . method calls throw
> compile time errors (so you cant really catch them). I had to resort
> to using Class/forName & clojure.lang.Reflector, which was quite bad
> for performance.
>
> So how would you do something like this?
>
Could you give some more information on the error you get (when log4j
is not found), especially a stack trace? And also some more
information on how your gjdv.logging macros work?
Thanks,
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---