<?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: Thoughts on Java logging and SLF4J</title>
	<atom:link href="http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j</link>
	<description>Nicolas Fränkel blog</description>
	<lastBuildDate>Wed, 10 Mar 2010 18:14:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nicolas Frankel</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-507</link>
		<dc:creator>Nicolas Frankel</dc:creator>
		<pubDate>Mon, 23 Nov 2009 20:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-507</guid>
		<description>&lt;a href=&quot;#comment-503&quot; rel=&quot;nofollow&quot;&gt;@kk &lt;/a&gt; 
Must have been lack of sleep or whatever: sorry about the mistake. This proves I should always make a prototype project synchronized with my post.</description>
		<content:encoded><![CDATA[<p><a href="#comment-503" rel="nofollow">@kk </a><br />
Must have been lack of sleep or whatever: sorry about the mistake. This proves I should always make a prototype project synchronized with my post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas Frankel</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-506</link>
		<dc:creator>Nicolas Frankel</dc:creator>
		<pubDate>Mon, 23 Nov 2009 20:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-506</guid>
		<description>&lt;a href=&quot;#comment-502&quot; rel=&quot;nofollow&quot;&gt;@Chris Wong &lt;/a&gt; 
Your point on the difference between wrappers and implementations is valid. Yet from a developer point of view, you call the API (which are all very similar) and magic happens. That was not the reason of the post, anyway.

Choosing to redirect commons-logging directly to log4j is a personal choice. I prefer to manage the classpath than 2 parallel properties files.</description>
		<content:encoded><![CDATA[<p><a href="#comment-502" rel="nofollow">@Chris Wong </a><br />
Your point on the difference between wrappers and implementations is valid. Yet from a developer point of view, you call the API (which are all very similar) and magic happens. That was not the reason of the post, anyway.</p>
<p>Choosing to redirect commons-logging directly to log4j is a personal choice. I prefer to manage the classpath than 2 parallel properties files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kk</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-503</link>
		<dc:creator>kk</dc:creator>
		<pubDate>Mon, 23 Nov 2009 17:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-503</guid>
		<description>&quot;Remove from classpath: log4.jar 	Would cycle calls from SLF4J to Log4J and back again&quot;

Slf4j doesn&#039;t do any logging itself. slf4j-log4j *uses log4j* to do the actual logging and thus log4j.jar is required if using slf4j-log4j. See slf4j manual -&gt; &quot;Binding with a logging framework at deployment time&quot;.</description>
		<content:encoded><![CDATA[<p>&#8220;Remove from classpath: log4.jar 	Would cycle calls from SLF4J to Log4J and back again&#8221;</p>
<p>Slf4j doesn&#8217;t do any logging itself. slf4j-log4j *uses log4j* to do the actual logging and thus log4j.jar is required if using slf4j-log4j. See slf4j manual -&gt; &#8220;Binding with a logging framework at deployment time&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wong</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-502</link>
		<dc:creator>Chris Wong</dc:creator>
		<pubDate>Mon, 23 Nov 2009 17:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-502</guid>
		<description>You should distinguish between logging wrappers (commons-logging, SLF4J) and logging implementations (log4j, JDK logging). There are reasons to choose wrappers over native implementations, and to choose between wrappers. Wrappers let you write logging code without worrying about concrete implementations: important if your code is meant to be used by third party apps that may have their own choice of logging implementation. Otherwise, they may be redundant. There are also newer implementations like logback that implement existing wrapper APIs. I generally configure both SLF4J and commons-logging to log through log4j so things don&#039;t get scattered between different log files. 

I blogged about this topic here:

http://chriswongdevblog.blogspot.com/2009/09/logging-should-i-wrap.html</description>
		<content:encoded><![CDATA[<p>You should distinguish between logging wrappers (commons-logging, SLF4J) and logging implementations (log4j, JDK logging). There are reasons to choose wrappers over native implementations, and to choose between wrappers. Wrappers let you write logging code without worrying about concrete implementations: important if your code is meant to be used by third party apps that may have their own choice of logging implementation. Otherwise, they may be redundant. There are also newer implementations like logback that implement existing wrapper APIs. I generally configure both SLF4J and commons-logging to log through log4j so things don&#8217;t get scattered between different log files. </p>
<p>I blogged about this topic here:</p>
<p><a href="http://chriswongdevblog.blogspot.com/2009/09/logging-should-i-wrap.html" rel="nofollow">http://chriswongdevblog.blogspot.com/2009/09/logging-should-i-wrap.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-500</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 22 Nov 2009 22:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-500</guid>
		<description>Note that Logger.isDebugEnabled() doesn&#039;t just avoid expensive String concatenation, but all expensive operations. So even with Slf4j you may still require such code blocks for cases where the log output requires an expensive operation, eg.

if (LOGGER.isDebugEnabled() {
  LOGGER.debug(&quot;Expensive result: {}&quot;, someObject.getSomeExpensiveResult());
}</description>
		<content:encoded><![CDATA[<p>Note that Logger.isDebugEnabled() doesn&#8217;t just avoid expensive String concatenation, but all expensive operations. So even with Slf4j you may still require such code blocks for cases where the log output requires an expensive operation, eg.</p>
<p>if (LOGGER.isDebugEnabled() {<br />
  LOGGER.debug(&#8220;Expensive result: {}&#8221;, someObject.getSomeExpensiveResult());<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas Frankel</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-499</link>
		<dc:creator>Nicolas Frankel</dc:creator>
		<pubDate>Sun, 22 Nov 2009 21:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-499</guid>
		<description>Hi Alexander,

You should remove commons-logging dependencies if 1. you want SLF4J to handle your log calls and 2. you provide jcl-over-slf4j.jar on the classpath. Hope I answered your question.</description>
		<content:encoded><![CDATA[<p>Hi Alexander,</p>
<p>You should remove commons-logging dependencies if 1. you want SLF4J to handle your log calls and 2. you provide jcl-over-slf4j.jar on the classpath. Hope I answered your question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashitkin Alexander</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-498</link>
		<dc:creator>Ashitkin Alexander</dc:creator>
		<pubDate>Sun, 22 Nov 2009 21:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-498</guid>
		<description>Hi Nicolas, thanks for your article. But after i&#039;ve been read it i have a question - i should removedependencies from all projects relied on commons-logging?</description>
		<content:encoded><![CDATA[<p>Hi Nicolas, thanks for your article. But after i&#8217;ve been read it i have a question &#8211; i should removedependencies from all projects relied on commons-logging?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
