<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Logging Dependencies in Spring</title>
	<atom:link href="http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Peter</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-174764</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 03 Aug 2010 09:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-174764</guid>
		<description>Is it possible to have spring logging work with the config file not directly on the class path?

I usually stick things like log4j.xml in a config directory and would like to do the same with this.

I&#039;ve tried using org.springframework.util.Log4jConfigurer and this gets logging working for my application, but spring itself is still silent.

Thanks,
Peter</description>
		<content:encoded><![CDATA[<p>Is it possible to have spring logging work with the config file not directly on the class path?</p>
<p>I usually stick things like log4j.xml in a config directory and would like to do the same with this.</p>
<p>I&#039;ve tried using org.springframework.util.Log4jConfigurer and this gets logging working for my application, but spring itself is still silent.</p>
<p>Thanks,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Glover</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-170435</link>
		<dc:creator>Robert Glover</dc:creator>
		<pubDate>Thu, 17 Dec 2009 20:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-170435</guid>
		<description>I immediately stopped using my own (inferior) solution in favor of Tony Dalbrekt&#039;s far better solution as soon as I saw his post.   In fact, just today I added the following to a maven parent pom I was modifying:

        &lt;!--
           See the blog entry at the following address for
           an explanation how/why slf4j is being used instead of
           commons-logging:
           http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/ 
        --&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;commons-logging&lt;/groupId&gt;
			&lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
			&lt;version&gt;1.1.1&lt;/version&gt;
			&lt;scope&gt;provided&lt;/scope&gt;
		&lt;/dependency&gt;

		&lt;dependency&gt;
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;
			&lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
			&lt;version&gt;1.5.8&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;
			&lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
			&lt;version&gt;1.5.8&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;
			&lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
			&lt;version&gt;1.5.8&lt;/version&gt;
		&lt;/dependency&gt;
		&lt;dependency&gt;
			&lt;groupId&gt;log4j&lt;/groupId&gt;
			&lt;artifactId&gt;log4j&lt;/artifactId&gt;
			&lt;version&gt;1.2.12&lt;/version&gt;
		&lt;/dependency&gt;</description>
		<content:encoded><![CDATA[<p>I immediately stopped using my own (inferior) solution in favor of Tony Dalbrekt&#039;s far better solution as soon as I saw his post.   In fact, just today I added the following to a maven parent pom I was modifying:</p>
<p>        &lt;!&#8211;<br />
           See the blog entry at the following address for<br />
           an explanation how/why slf4j is being used instead of<br />
           commons-logging:<br />
           <a href="http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/" rel="nofollow">http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/</a><br />
        &#8211;&gt;<br />
		&lt;dependency&gt;<br />
			&lt;groupId&gt;commons-logging&lt;/groupId&gt;<br />
			&lt;artifactId&gt;commons-logging&lt;/artifactId&gt;<br />
			&lt;version&gt;1.1.1&lt;/version&gt;<br />
			&lt;scope&gt;provided&lt;/scope&gt;<br />
		&lt;/dependency&gt;</p>
<p>		&lt;dependency&gt;<br />
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;<br />
			&lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;<br />
			&lt;version&gt;1.5.8&lt;/version&gt;<br />
		&lt;/dependency&gt;<br />
		&lt;dependency&gt;<br />
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;<br />
			&lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;<br />
			&lt;version&gt;1.5.8&lt;/version&gt;<br />
		&lt;/dependency&gt;<br />
		&lt;dependency&gt;<br />
			&lt;groupId&gt;org.slf4j&lt;/groupId&gt;<br />
			&lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;<br />
			&lt;version&gt;1.5.8&lt;/version&gt;<br />
		&lt;/dependency&gt;<br />
		&lt;dependency&gt;<br />
			&lt;groupId&gt;log4j&lt;/groupId&gt;<br />
			&lt;artifactId&gt;log4j&lt;/artifactId&gt;<br />
			&lt;version&gt;1.2.12&lt;/version&gt;<br />
		&lt;/dependency&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Wright</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-170430</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Thu, 17 Dec 2009 19:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-170430</guid>
		<description>As an addendum to what Dave suggested to Tom, if you&#039;re using maven, you can see where a dependency is coming from by doing &quot;mvn dependency:tree&quot;.  The rule of thumb with maven is that if you&#039;re explicitly using some package/jar/dependency, then you should explicitly list it in your maven dependencies; don&#039;t just let arrive in your project as a side effect of it being pulled in by something else.</description>
		<content:encoded><![CDATA[<p>As an addendum to what Dave suggested to Tom, if you&#039;re using maven, you can see where a dependency is coming from by doing &#034;mvn dependency:tree&#034;.  The rule of thumb with maven is that if you&#039;re explicitly using some package/jar/dependency, then you should explicitly list it in your maven dependencies; don&#039;t just let arrive in your project as a side effect of it being pulled in by something else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Syer</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-170420</link>
		<dc:creator>Dave Syer</dc:creator>
		<pubDate>Thu, 17 Dec 2009 15:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-170420</guid>
		<description>@Robert: I edited your post because Wordpress ate your XML formatting.  I had to gues what the original said, but it looks to me like the same set of dependencies as in the main article, unless I missed something.  You just replaced the exlcusion with an empty jar (which is the &quot;version 99&quot; approach).

@Tom: someone on the forum reported the same issue and I think it turned out that log4j wasn&#039;t being used because of another logging library that was pulled in by Hibernate (or another external library).  Check your classpath carefully.</description>
		<content:encoded><![CDATA[<p>@Robert: I edited your post because WordPress ate your XML formatting.  I had to gues what the original said, but it looks to me like the same set of dependencies as in the main article, unless I missed something.  You just replaced the exlcusion with an empty jar (which is the &#034;version 99&#034; approach).</p>
<p>@Tom: someone on the forum reported the same issue and I think it turned out that log4j wasn&#039;t being used because of another logging library that was pulled in by Hibernate (or another external library).  Check your classpath carefully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-170185</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 12 Dec 2009 05:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-170185</guid>
		<description>I&#039;ve recently started using logback as an alternative to log4j.  It has native support for slf4j, and the config/api is very similar to log4j as an added bonus.</description>
		<content:encoded><![CDATA[<p>I&#039;ve recently started using logback as an alternative to log4j.  It has native support for slf4j, and the config/api is very similar to log4j as an added bonus.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomS</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-170134</link>
		<dc:creator>TomS</dc:creator>
		<pubDate>Thu, 10 Dec 2009 19:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-170134</guid>
		<description>When I upgraded my logging from Spring 2.5 to 3.0 it appears that log4j.xml is read and configured when log4j.debug is on, but even though I turned off all the INFO level messages from org.springframework these all now appear in 3.0 where as they did not in 2.5.</description>
		<content:encoded><![CDATA[<p>When I upgraded my logging from Spring 2.5 to 3.0 it appears that log4j.xml is read and configured when log4j.debug is on, but even though I turned off all the INFO level messages from org.springframework these all now appear in 3.0 where as they did not in 2.5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uberVU - social comments</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-169954</link>
		<dc:creator>uberVU - social comments</dc:creator>
		<pubDate>Sat, 05 Dec 2009 22:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-169954</guid>
		<description>&lt;strong&gt;Social comments and analytics for this post...&lt;/strong&gt;

This post was mentioned on Twitter by Ibrahim Saracoglu: Logging Dependencies in Spring http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/ #java #spring #jcl #slf4j #log4j...</description>
		<content:encoded><![CDATA[<p><strong>Social comments and analytics for this post&#8230;</strong></p>
<p>This post was mentioned on Twitter by Ibrahim Saracoglu: Logging Dependencies in Spring <a href="http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/" rel="nofollow">http://blog.springsource.com/2009/12/04/logging-dependencies-in-spring/</a> #java #spring #jcl #slf4j #log4j&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Glover</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-169912</link>
		<dc:creator>Robert Glover</dc:creator>
		<pubDate>Fri, 04 Dec 2009 21:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-169912</guid>
		<description>Because of a need to develop locally in Tomcat but later deploy to IBM Websphere 6.1, I wrote a 31 page Power Point Presentation named &quot;HOW_TO_CONFIGURE_commons-logging-for-artifactory_with_slf4j.pptx&quot;.  Unfortunately there is no way to attached it to this comment.  

     What I basically did was devise an &quot;Artifactory port&quot; of the concepts of the solution explained at the link in the comment before this one and at the following two links: 

http://stubbisms.wordpress.com/2008/07/27/death-to-commons-logging-long-live-slf4j/

http://www.slf4j.org/legacy.html

     The gist of the solution was to create within &quot;Artifactory&quot; a “dummy” commons-logging jar file to replace the “real” commons-logging jar file.  The dummy JCL jar file contains the same &quot;MANIFEST-MF&quot; file as the real commons-logging jar file and one dummy java class.  When doing a local maven build, the &quot;dummy&quot; version of the JCL jar gets copied from Artifactory into the local maven repository on the local hard drive.

   The  changes in the Pom file of the Spring Webapp were to add the following: 

&lt;code lang=&quot;xml&quot;&gt;
    &lt;dependency&gt; 
           &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
           &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
           &lt;version&gt;1.5.8&lt;/version&gt;
    &lt;/dependency&gt;
       
    &lt;dependency&gt; 
           &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
           &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
           &lt;version&gt;1.5.8&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt; 
           &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
           &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
           &lt;version&gt;1.5.8&lt;/version&gt;
    &lt;/dependency&gt;
           	
    &lt;dependency&gt; 
           &lt;groupId&gt;log4j&lt;/groupId&gt;
           &lt;artifactId&gt;log4j&lt;/artifactId&gt;
           &lt;version&gt;1.2.9&lt;/version&gt;
    &lt;/dependency&gt;
&lt;/code&gt;

   With this solution JCL works okay in IBM Websphere 6.1,  and there is no need to change the &quot;parent last&quot; setting. In the past, changing that setting didn&#039;t work for me, which is why I took the time to devise this solution.</description>
		<content:encoded><![CDATA[<p>Because of a need to develop locally in Tomcat but later deploy to IBM Websphere 6.1, I wrote a 31 page Power Point Presentation named &#034;HOW_TO_CONFIGURE_commons-logging-for-artifactory_with_slf4j.pptx&#034;.  Unfortunately there is no way to attached it to this comment.  </p>
<p>     What I basically did was devise an &#034;Artifactory port&#034; of the concepts of the solution explained at the link in the comment before this one and at the following two links: </p>
<p><a href="http://stubbisms.wordpress.com/2008/07/27/death-to-commons-logging-long-live-slf4j/" rel="nofollow">http://stubbisms.wordpress.com/2008/07/27/death-to-commons-logging-long-live-slf4j/</a></p>
<p><a href="http://www.slf4j.org/legacy.html" rel="nofollow">http://www.slf4j.org/legacy.html</a></p>
<p>     The gist of the solution was to create within &#034;Artifactory&#034; a “dummy” commons-logging jar file to replace the “real” commons-logging jar file.  The dummy JCL jar file contains the same &#034;MANIFEST-MF&#034; file as the real commons-logging jar file and one dummy java class.  When doing a local maven build, the &#034;dummy&#034; version of the JCL jar gets copied from Artifactory into the local maven repository on the local hard drive.</p>
<p>   The  changes in the Pom file of the Spring Webapp were to add the following: </p>
<p><code lang="xml"><br />
    <dependency><br />
           <groupid>org.slf4j</groupid><br />
           <artifactid>slf4j-api</artifactid><br />
           <version>1.5.8</version><br />
    </dependency></p>
<p>    <dependency><br />
           <groupid>org.slf4j</groupid><br />
           <artifactid>jcl-over-slf4j</artifactid><br />
           <version>1.5.8</version><br />
    </dependency></p>
<p>    <dependency><br />
           <groupid>org.slf4j</groupid><br />
           <artifactid>slf4j-log4j12</artifactid><br />
           <version>1.5.8</version><br />
    </dependency></p>
<p>    <dependency><br />
           <groupid>log4j</groupid><br />
           <artifactid>log4j</artifactid><br />
           <version>1.2.9</version><br />
    </dependency><br />
</code></p>
<p>   With this solution JCL works okay in IBM Websphere 6.1,  and there is no need to change the &#034;parent last&#034; setting. In the past, changing that setting didn&#039;t work for me, which is why I took the time to devise this solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Wright</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-169907</link>
		<dc:creator>Rusty Wright</dc:creator>
		<pubDate>Fri, 04 Dec 2009 19:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-169907</guid>
		<description>Great tip Tony; I&#039;ve been using the 99.0-does-not-exist hack for a while now and it&#039;s nice to not need that.</description>
		<content:encoded><![CDATA[<p>Great tip Tony; I&#039;ve been using the 99.0-does-not-exist hack for a while now and it&#039;s nice to not need that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Syer</title>
		<link>http://blog.springsource.org/2009/12/04/logging-dependencies-in-spring/comment-page-1/#comment-169905</link>
		<dc:creator>Dave Syer</dc:creator>
		<pubDate>Fri, 04 Dec 2009 19:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.springsource.com/?p=3513#comment-169905</guid>
		<description>Thanks for the additional suggestion.  There&#039;s always more than one way, as they say, to skin a cat.

I updated your comment and added back the XML that the blog machine helpfully stripped out when you posted.  Hope that&#039;s OK.</description>
		<content:encoded><![CDATA[<p>Thanks for the additional suggestion.  There&#039;s always more than one way, as they say, to skin a cat.</p>
<p>I updated your comment and added back the XML that the blog machine helpfully stripped out when you posted.  Hope that&#039;s OK.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

