Skip to Content.
Sympa Menu

mace-opensaml-users - Re: Change of logging framework

Subject: OpenSAML user discussion

List archive

Re: Change of logging framework


Chronological Thread 
  • From: Chad La Joie <>
  • To:
  • Subject: Re: Change of logging framework
  • Date: Wed, 07 Nov 2007 09:56:25 +0100
  • Organization: SWITCH

Actually it was used in the XMLTooling code in a few places, but I fixed them up to use ClassLoader.loadClass instead.

Note, I do *not* use the thread context class loader because the two places (dealing with library configuration) are global (to the application) and not restricted to the thread. So, if the application container is following the J2EE model of self-first, then delegate, class loading this will work as it should. Apps running outside a container shouldn't notice any change.

Anil Saldhana wrote:
Thanks Chad for the reply. I think slf4j should work fine.

The reference to Class.forName was a general reference to the OpenSAML2 code base (not particularly tied to logging). I remember seeing the usage long ago. I did a fresh scan on the alpha1 tagged workspace and I do not see any usage. So please ignore. :)

Thanks for the good work.

On Nov 5, 2007 11:41 PM, Chad La Joie < <mailto:>> wrote:



Anil Saldhana wrote:
> A question I want to ask is: if my managed server environment
(Ex:Java
> EE Application Server) still uses commons-logging/log4J, will I
be able
> to use sl4j in that environment just for opensaml2? Any issues
you foresee?

Your best bet is to read up on the documentation for SLF4J. The short
answer is, yes, this is fine.

> Another issue I want to point is whether it is possible to make
use of
> thread context class loader to create instances rather than
> Class.forName ? This is required in Java EE environments (due to
class
> loaders issue again).

This will depend on the underlying logging system you use. SLF4J just
binds to some system, so it will depend on what that logging system
does. SLF4J, itself, does not use Class.forName.

--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Security
Werdstrasse 2, P.O. Box, 8021 Zurich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68



<mailto:>,
http://www.switch.ch



--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Security
Werdstrasse 2, P.O. Box, 8021 Zurich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
,
http://www.switch.ch



Archive powered by MHonArc 2.6.16.

Top of Page