<?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, 08 Feb 2012 07:06:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Nicolas Frankel</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-697</link>
		<dc:creator>Nicolas Frankel</dc:creator>
		<pubDate>Mon, 27 Sep 2010 18:22:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-697</guid>
		<description>&lt;a href=&quot;#comment-696&quot; rel=&quot;nofollow&quot;&gt;@Stefan &lt;/a&gt; 
Thanks for your comment. Based on plain old facts, like the date, you&#039;re right. And yet you know as I do that most frameworks do not upgrade their dependencies when a new version is out. Besides (but that was not my initial point), for newer versions, making a dependency optional in Maven is not a thing to do. Never! So I guess it&#039;s still strange...</description>
		<content:encoded><![CDATA[<p><a href="#comment-696" rel="nofollow">@Stefan </a><br />
Thanks for your comment. Based on plain old facts, like the date, you&#8217;re right. And yet you know as I do that most frameworks do not upgrade their dependencies when a new version is out. Besides (but that was not my initial point), for newer versions, making a dependency optional in Maven is not a thing to do. Never! So I guess it&#8217;s still strange&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-696</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Mon, 27 Sep 2010 18:06:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-696</guid>
		<description>Hi Nicolas, thanks for sharing your thoughts.
Just one question, to which version of jcl do you refer in your strange facts?
The strange dependencies are marked as optional for commons logging version 1.1.1 which was released in Nov 2007. If your experience is with an older version this might be a little bit misleading.</description>
		<content:encoded><![CDATA[<p>Hi Nicolas, thanks for sharing your thoughts.<br />
Just one question, to which version of jcl do you refer in your strange facts?<br />
The strange dependencies are marked as optional for commons logging version 1.1.1 which was released in Nov 2007. If your experience is with an older version this might be a little bit misleading.</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-623</link>
		<dc:creator>Nicolas Frankel</dc:creator>
		<pubDate>Fri, 18 Jun 2010 16:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-623</guid>
		<description>It should be corrected now. Thanks for the information, I changed the way I highlighted code but I was too lazy to look for regression in all articles.</description>
		<content:encoded><![CDATA[<p>It should be corrected now. Thanks for the information, I changed the way I highlighted code but I was too lazy to look for regression in all articles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian E</title>
		<link>http://blog.frankel.ch/thoughts-on-java-logging-and-slf4j/comment-page-1#comment-622</link>
		<dc:creator>Brian E</dc:creator>
		<pubDate>Thu, 17 Jun 2010 23:08:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.frankel.ch/?p=310#comment-622</guid>
		<description>Thanks for the post.  However the code sections don&#039;t render properly in firefox 3.6.3.  I was able to look at the source but just a FYI.</description>
		<content:encoded><![CDATA[<p>Thanks for the post.  However the code sections don&#8217;t render properly in firefox 3.6.3.  I was able to look at the source but just a FYI.</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-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>
</channel>
</rss>

