<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2570152082229970757</id><updated>2012-02-16T02:08:58.394-08:00</updated><category term='apache'/><category term='logging'/><category term='xml'/><category term='Libzter'/><category term='XStream'/><category term='programming'/><category term='codehause'/><category term='serialization'/><category term='open source'/><category term='Java'/><category term='Log4j'/><category term='API'/><category term='libraries'/><category term='library'/><title type='text'>Developing in Java</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thejavadevelopers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://thejavadevelopers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>thejavadeveloper</name><uri>http://www.blogger.com/profile/06020629492281070411</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://2.bp.blogspot.com/_ndd0JIyZfvY/TD4pMdjI_gI/AAAAAAAAABs/nI7waFBbm2Y/S220/libsterlogo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2570152082229970757.post-8851000020582722677</id><published>2010-07-14T14:40:00.000-07:00</published><updated>2010-07-14T15:35:24.609-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Log4j'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>Log4j</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ndd0JIyZfvY/TD43WYNKg3I/AAAAAAAAACM/fOaXKArtGZs/s1600/logo.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 126px; height: 84px;" src="http://4.bp.blogspot.com/_ndd0JIyZfvY/TD43WYNKg3I/AAAAAAAAACM/fOaXKArtGZs/s200/logo.jpg" alt="" id="BLOGGER_PHOTO_ID_5493889453032899442" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Background&lt;/span&gt;&lt;br /&gt;Now it's time for the second library on this blog and the turn has come to &lt;a href="http://www.libzter.com/wiki/Log4j"&gt;Log4j&lt;/a&gt;. The log4j is a library used for logging in a Java program. The library has been highly distributed and there are many applications, both open source and proprietary that I have found using the library. The library is provided and maintained by the Apache foundation and the lib has been around for quite a while.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Levels&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Lo&lt;/span&gt;g4j works with something called logging level and there are a number of levels, these are DEBUG, INFO, WARN, ERROR, FATAL. When a program that implements log4j runs it is set to log on a specific level and all messages that correspond to that and higher level (debug lowest, Fatal highest) will then be logged to the output.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Use&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Log4j is easy to use and when you have defined your logger in a class like this:&lt;/span&gt;&lt;br /&gt;&lt;pre class="de1"  style="font-family:times new roman;"&gt;&lt;span class="kw1"&gt;static&lt;/span&gt; Logger logger &lt;span class="sy0"&gt;=&lt;/span&gt; Logger.&lt;span class="me1"&gt;getLogger&lt;/span&gt;&lt;span class="br0"&gt;(My&lt;/span&gt;.&lt;span class="kw1"&gt;class&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="sy0"&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size:100%;"&gt;the only thing you have to do to log something is call &lt;span style="font-family:times new roman;"&gt;logger.info("Message");&lt;/span&gt;&lt;/span&gt; This will make our program log a message on the level info.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Configuration and Appenders&lt;/span&gt;&lt;br /&gt;What really strikes me when using this library is the powerful logging configuration that you can do after you actually have done your programming. When log4j is loaded it loads a configuration file that tells the library how you want it to log the output. To do this you add to your config something call appenders which are small applications that can take log4j output and log it to a medium, for an example there are appenders that can log to file, database, IM, email and so on.&lt;br /&gt;In the configuration you are also able to configure on what level the appender should log. For a reference on how to configure the config file see the &lt;a href="http://logging.apache.org/log4j/1.2/manual.html"&gt;official log4j site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In all of my Java projects Log4j is going to be sure companion due to its versatility in logging output and reconfigurability after the project has left the workshop.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;/Fredrik&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.libzter.com/wiki/Log4j"&gt;log4j - Libzter Article&lt;/a&gt;&lt;br /&gt;&lt;a href="http://logging.apache.org/log4j"&gt;log4j - Official site &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2570152082229970757-8851000020582722677?l=thejavadevelopers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thejavadevelopers.blogspot.com/feeds/8851000020582722677/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/log4j.html#comment-form' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/8851000020582722677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/8851000020582722677'/><link rel='alternate' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/log4j.html' title='Log4j'/><author><name>thejavadeveloper</name><uri>http://www.blogger.com/profile/06020629492281070411</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://2.bp.blogspot.com/_ndd0JIyZfvY/TD4pMdjI_gI/AAAAAAAAABs/nI7waFBbm2Y/S220/libsterlogo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ndd0JIyZfvY/TD43WYNKg3I/AAAAAAAAACM/fOaXKArtGZs/s72-c/logo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2570152082229970757.post-7421227583949093520</id><published>2010-07-13T16:05:00.000-07:00</published><updated>2010-07-14T01:37:30.725-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='XStream'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Libzter'/><category scheme='http://www.blogger.com/atom/ns#' term='codehause'/><title type='text'>XStream</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ndd0JIyZfvY/TD12MBk5R6I/AAAAAAAAABg/6S3nkiCSZkY/s1600/logo.gif"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 161px; height: 53px;" src="http://1.bp.blogspot.com/_ndd0JIyZfvY/TD12MBk5R6I/AAAAAAAAABg/6S3nkiCSZkY/s200/logo.gif" alt="" id="BLOGGER_PHOTO_ID_5493677069415565218" border="0" /&gt;&lt;/a&gt;As a first post I will talk a little bit about a library that I came across a couple of months ago. &lt;a href="http://www.libzter.com/wiki/XStream"&gt;XStream&lt;/a&gt; is a java library for doing object serialization/deserialization to and from XML. I have used and played with it for some weeks and i'm impressed of what this library is capable of performing. It has never fail to serialize any of the objects that I have given it and that includes many objects that doesn't implement the serializable interface form the core java API. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The library is maintained by Codehause and is an open source library and comes with a BSD licence. I like the fact that you are able to understand and edit the xml that XStream produces of your object. Another thing that I really like with the lib is that it is so easy to use, the only thing you have to do is create your XStream object and then call the method xstremObj.toXML(myObject) to get it as an XML String and to deserialize it you call xstreamObj.fromXML(xmlString), almost to easy. &lt;/div&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/Fredrik &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.libzter.com/wiki/XStream"&gt;XStream - Libzter article&lt;/a&gt;&lt;br /&gt;&lt;a href="http://xstream.codehaus.org/"&gt;XStream - Official site&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2570152082229970757-7421227583949093520?l=thejavadevelopers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thejavadevelopers.blogspot.com/feeds/7421227583949093520/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/xstream.html#comment-form' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/7421227583949093520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/7421227583949093520'/><link rel='alternate' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/xstream.html' title='XStream'/><author><name>thejavadeveloper</name><uri>http://www.blogger.com/profile/06020629492281070411</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://2.bp.blogspot.com/_ndd0JIyZfvY/TD4pMdjI_gI/AAAAAAAAABs/nI7waFBbm2Y/S220/libsterlogo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ndd0JIyZfvY/TD12MBk5R6I/AAAAAAAAABg/6S3nkiCSZkY/s72-c/logo.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2570152082229970757.post-3358992637648728224</id><published>2010-07-12T01:28:00.000-07:00</published><updated>2010-07-12T01:57:57.325-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Libzter'/><category scheme='http://www.blogger.com/atom/ns#' term='libraries'/><title type='text'>New blogg</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Welcome&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Hi and welcome to my blog where I aim to write articles about Java and especially about libraries and frameworks. I have set a goal that I will learn more about the great tools that are available to us programmers and especially for Java.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Libzter&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/_ndd0JIyZfvY/TDrYVFgYVnI/AAAAAAAAABU/SRyOSeDJ78c/s200/libsterlogo.png" style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 166px;" border="0" alt="" id="BLOGGER_PHOTO_ID_5492940552298583666" /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have also started a site with my friends called &lt;a href="http://www.libzter.com/wiki/Main_Page"&gt;www.libzter.com&lt;/a&gt; where I also will post information about the libraries that i will look at. My goal with Libzter is that it should be a great site where you easily can look up any type of programming library that you are interested in and get information and examples of how to use it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Libzter comes in the form of a Wiki so if you are a programmer and have a favorite library or even have created and distributed you own library (open source or proprietary) then write about it on Libzter and post a link back to your own site hosting the lib.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Continues work&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The libraries that I will mainly focus on at the moment are going to be libraries that are licensed as open source. I hope that you as well as I will find both this blog and Libzter useful in the learning process of new programming libraries. &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;/Fredrik&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2570152082229970757-3358992637648728224?l=thejavadevelopers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thejavadevelopers.blogspot.com/feeds/3358992637648728224/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/new-blogg.html#comment-form' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/3358992637648728224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2570152082229970757/posts/default/3358992637648728224'/><link rel='alternate' type='text/html' href='http://thejavadevelopers.blogspot.com/2010/07/new-blogg.html' title='New blogg'/><author><name>thejavadeveloper</name><uri>http://www.blogger.com/profile/06020629492281070411</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://2.bp.blogspot.com/_ndd0JIyZfvY/TD4pMdjI_gI/AAAAAAAAABs/nI7waFBbm2Y/S220/libsterlogo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ndd0JIyZfvY/TDrYVFgYVnI/AAAAAAAAABU/SRyOSeDJ78c/s72-c/libsterlogo.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
