mace-opensaml-users - Re: Change of logging framework
Subject: OpenSAML user discussion
List archive
- From: HÃ¥kon Tuvin Sagehaug <>
- To:
- Subject: Re: Change of logging framework
- Date: Fri, 09 Nov 2007 12:29:16 +0100
With the same jars and no jars I get
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:221)
at org.apache.xml.security.Init.<clinit>(Unknown Source)
The only thing that worked for me is the slf4j-simple.jar. But that only logs at the INFO level.
Chad La Joie skrev:
No, it should be okay. I've done full, clean, builds of it this morning just to make sure I didn't miss anything and they were fine. My test 2.0 IdP is using the new code as well.
What error are you getting?
Håkon Tuvin Sagehaug wrote:
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)
- Re: Change of logging framework, (continued)
- Re: Change of logging framework, Anil Saldhana, 11/05/2007
- Re: Change of logging framework, Chad La Joie, 11/06/2007
- Re: Change of logging framework, Anil Saldhana, 11/06/2007
- Re: Change of logging framework, Chad La Joie, 11/07/2007
- Re: Change of logging framework, Anil Saldhana, 11/06/2007
- Re: Change of logging framework, Chad La Joie, 11/06/2007
- Re: Change of logging framework, Chad La Joie, 11/08/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, HÃ¥kon Tuvin Sagehaug, 11/09/2007
- Re: Change of logging framework, Chad La Joie, 11/09/2007
- Re: Change of logging framework, Anil Saldhana, 11/05/2007
Archive powered by MHonArc 2.6.16.