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: HÃ¥kon Tuvin Sagehaug <>
  • To:
  • Subject: Re: Change of logging framework
  • Date: Fri, 09 Nov 2007 12:22:44 +0100

Hi

I got the new code from svn, but when I tried to use it with my own I got errors. Do I need to have any jar in my own classpath to use the logging features form openSAML?

I tried with the same as in the open-xamltooling but got errors then to.

Chad La Joie skrev:
SLF4J isn't a logging framework, it's just a interface to one. You can use Log4J, Java Util Logging, and other logging frameworks with it. Which framework you use is going to have it's own configuration language.

The first place to start is probably here:
http://slf4j.org/manual.html

Then, pick which logging framework you want to use. If you want to use log4j you can.


Håkon Tuvin Sagehaug wrote:
Do you have any experience in writing properties file for slf4j?
I translated my log4j.properties file in the translator at their page, but it will only log at INFO level, even if I set DEBUG as desired level, any tips??

Håkon


Chad La Joie skrev:
Change has been made. I also rev'ed a few libraries to pick up bug fixes, performance enhancements, etc.

Chad La Joie wrote:
Okay, I'll probably do this tomorrow morning (my time, GMT+1) if I don't have any objects by the time I get in tomorrow. Feedback so far seems to indicate this is a generally good move.

Chad La Joie wrote:
About a week ago I moved the Shibboleth IdP code base to use SLF4J as its logging interface. I did this for one main reason; different environments have really begun to diverge in their logging layer. Some (e.g. some versions of Tomcat) are using old versions Log4J, some are using newer version that break when used with the older version (yay for API changes in patch releases), some are using the java.util.logging (JULI) system. This is making it increasingly difficult to figure out what to target and leading to a number of class/classpath errors. In addition I got some syntax sugar, which was nice, but not the reason I made the change.

After evaluating SLF4J I found that it suited the needs of the IdP. It is similar to Jakarta Commons Logging but without some of the classloading issues. It can bind to Log4J, JULI, and other logging systems. If no one has any objections I'd like to move the OpenSAML stack (XMLTooling, OpenWS, and OpenSAML 2) to SLF4J.

For more information on SLF4J you can check out its website:
http://www.slf4j.org/

For some discussion on the problems with Jakarta Logging Commons you can check out this blog entry and related links.
http://bsnyderblog.blogspot.com/2007/08/my-soapbox-for-slf4j.html

I will *not* be recommending a particular binding for SLF4J (i.e. Log4J, JULI, LogBack, whatever), people should use what is best/supported in their environment. I can say for the IdP I happen to use LogBack because it has a few features that I prefer that Log4J doesn't have. I personally refuse to use JULI mostly for the reasons cited in the above blog post.

So, if you have comments, please let me know by the end of the week.

Thanks.








--
Håkon Sagehaug
Research Assistant
Parallab
Bergen Center for Computational Science (BCCS)



Archive powered by MHonArc 2.6.16.

Top of Page