<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Log4php - All your logging needs</title>
	<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/11/05/log4php-all-your-logging-needs/</link>
	<description>web application development with popular technologies</description>
	<pubDate>Tue, 02 Dec 2008 07:58:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Cameron Manderson</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/11/05/log4php-all-your-logging-needs/#comment-10137</link>
		<pubDate>Tue, 07 Nov 2006 10:12:08 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/11/05/log4php-all-your-logging-needs/#comment-10137</guid>
					<description>For more information about pluggable logging in Java you should investigate Apache commons-logging package. It can automatically detect a log4j.properties and attempt to use it, or you can manually configure the logging class externally using a commons-logging.properties.

Your code should be implemented like below to obtain your logger (add the commons-logging.jar to your classpath):

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

...
class MyClass {
...
private static final Log log = LogFactory.getLog(MyClass.class);
...
log.trace("My Trace");
log.debug("My Debug");
log.info("My Info");
// etc
...
}

Read about Apache commons logging here-
http://jakarta.apache.org/commons/logging/</description>
		<content:encoded><![CDATA[<p>For more information about pluggable logging in Java you should investigate Apache commons-logging package. It can automatically detect a log4j.properties and attempt to use it, or you can manually configure the logging class externally using a commons-logging.properties.</p>
<p>Your code should be implemented like below to obtain your logger (add the commons-logging.jar to your classpath):</p>
<p>import org.apache.commons.logging.Log;<br />
import org.apache.commons.logging.LogFactory;</p>
<p>&#8230;<br />
class MyClass {<br />
&#8230;<br />
private static final Log log = LogFactory.getLog(MyClass.class);<br />
&#8230;<br />
log.trace(&#8221;My Trace&#8221;);<br />
log.debug(&#8221;My Debug&#8221;);<br />
log.info(&#8221;My Info&#8221;);<br />
// etc<br />
&#8230;<br />
}</p>
<p>Read about Apache commons logging here-<br />
<a href="http://jakarta.apache.org/commons/logging/" rel="nofollow">http://jakarta.apache.org/commons/logging/</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Cameron Manderson</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/11/05/log4php-all-your-logging-needs/#comment-9741</link>
		<pubDate>Sun, 05 Nov 2006 21:20:54 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/11/05/log4php-all-your-logging-needs/#comment-9741</guid>
					<description>It is worth mentioning that this structure has been replicated into other programming languages as well, such as Flash Actionscript. 

The package allows some neat ways to turn on and off different logging levels, as well as setting those different levels for different packages in your application. It virtually allows you to leave your logging in your code but choose what levels of information you need from parts of your application when you need to diagnose an error or use case. All is achieved through a .properties file without changing any of your classes.

With Java we would setup a way to abstract our logging code. This way we can change the logging system amongst any logging framework - accessing it through a logging factory which generates a interface class with the functions log.trace(..), log.debug(..) etc.</description>
		<content:encoded><![CDATA[<p>It is worth mentioning that this structure has been replicated into other programming languages as well, such as Flash Actionscript. </p>
<p>The package allows some neat ways to turn on and off different logging levels, as well as setting those different levels for different packages in your application. It virtually allows you to leave your logging in your code but choose what levels of information you need from parts of your application when you need to diagnose an error or use case. All is achieved through a .properties file without changing any of your classes.</p>
<p>With Java we would setup a way to abstract our logging code. This way we can change the logging system amongst any logging framework - accessing it through a logging factory which generates a interface class with the functions log.trace(..), log.debug(..) etc.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
