<?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-8508086504802303915</id><updated>2012-02-16T11:45:41.532-05:00</updated><category term='STOKEN_UTILS'/><category term='INTRODUCTION'/><title type='text'>StoKen Projects</title><subtitle type='html'>A description of some projects I am working on.  Here and there, an occasional thought.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stoken-projects.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stoken-projects.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>uuklanger</name><uri>http://www.blogger.com/profile/14618539429202133895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_-pSEC4XHesg/STi7xOU17SI/AAAAAAAAADc/YDktvrh5FC8/S220/spain.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-8508086504802303915.post-1483840677343562987</id><published>2007-05-15T23:11:00.000-04:00</published><updated>2007-08-02T16:55:06.983-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STOKEN_UTILS'/><title type='text'>stoken-utils - AppInfo for build number automation</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;Overview&lt;/span&gt;&lt;br /&gt;In my mind there needs to be a simple way to automate build numbers within a project.   The &lt;a href="http://code.google.com/p/stoken-utils/"&gt;stoken-utils&lt;/a&gt; project is handy for helping with this using features of ANT and JAVA.  It is a small portable library that, among other thing, helps manage project level build numbers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Project Information&lt;/span&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/stoken-utils/"&gt;stoken-utils&lt;/a&gt; can be downloaded &lt;a href="http://code.google.com/p/stoken-utils/"&gt;here&lt;/a&gt;.  &lt;span style="font-style: italic;"&gt;You may also find the &lt;/span&gt;&lt;a style="font-style: italic;" href="http://stoken-projects.blogspot.com/2007/04/stoken-utils-logger.html"&gt;logger&lt;/a&gt;&lt;span style="font-style: italic;"&gt; feature of this library also interesting&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Usage&lt;/span&gt;&lt;br /&gt;I have already &lt;a href="http://stoken-tips-and-tricks.blogspot.com/"&gt;blogged&lt;/a&gt; about this approach &lt;a href="http://stoken-tips-and-tricks.blogspot.com/2007/04/howto-use-ant-with-java-to-dynamically.html"&gt;here&lt;/a&gt;.  In a nutshell, usage is not to complex.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add a small XML stub to your build.xml&lt;/li&gt;&lt;li&gt;Modify it with your project specifics (name, description, copyright,....)&lt;/li&gt;&lt;li&gt;Load appinfo.properties via AppInfo.init(...) &lt;a style="font-style: italic;" href="http://home.columbus.rr.com/klanger/javadoc/stokenutils/"&gt;see javadoc&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Access values using AppInfo static methods.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;To look at some code that uses this libarary check out the subversion tab of &lt;a href="http://code.google.com/p/language-translate/"&gt;language-translate&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Final Thoughts&lt;/span&gt;&lt;br /&gt;stoken-utils has a simple approach for managing build numbers using ANT and JAVA.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8508086504802303915-1483840677343562987?l=stoken-projects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stoken-projects.blogspot.com/feeds/1483840677343562987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8508086504802303915&amp;postID=1483840677343562987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/1483840677343562987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/1483840677343562987'/><link rel='alternate' type='text/html' href='http://stoken-projects.blogspot.com/2007/05/stoken-utils-appinfo-for-build-number.html' title='stoken-utils - AppInfo for build number automation'/><author><name>uuklanger</name><uri>http://www.blogger.com/profile/14618539429202133895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_-pSEC4XHesg/STi7xOU17SI/AAAAAAAAADc/YDktvrh5FC8/S220/spain.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8508086504802303915.post-6666705814015964003</id><published>2007-04-16T22:34:00.000-04:00</published><updated>2007-08-02T16:41:57.464-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STOKEN_UTILS'/><title type='text'>stoken-utils logger</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;Overview&lt;/span&gt;&lt;br /&gt;On occasion a simple logger comes in handy.  Granted &lt;a href="http://logging.apache.org/"&gt;log4j&lt;/a&gt; rules and will solve all your enterprise level logging needs, but in some cases, you just want something written to a file with minimal fuss.  That is where the the &lt;a href="http://code.google.com/p/stoken-utils/"&gt;logger&lt;/a&gt; comes in.  It is part of a small library of utilities called &lt;a href="http://code.google.com/p/stoken-utils/"&gt;stoken-utils&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Project Information&lt;/span&gt;&lt;br /&gt;Download: &lt;a href="http://code.google.com/p/stoken-utils/"&gt;http://code.google.com/p/stoken-utils/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Usage&lt;br /&gt;&lt;/span&gt;Using logger is easy.  There are several overloaded static methods.  The one with the most options is as follows:&lt;br /&gt;&lt;pre class="code" style="border-left: 3px solid rgb(204, 204, 204); padding: 0.5em; margin-left: 2em; font-family: courier new;"&gt;public static boolean writeLog(&lt;br /&gt;           String PROGNAME,&lt;br /&gt;           String MODULE,&lt;br /&gt;           TYPE type,&lt;br /&gt;           String msg,&lt;br /&gt;           boolean addblank&lt;br /&gt;           );&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;PROGNAME&lt;/span&gt; - name of your program (or AppInfo.getPROGNAME())&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MODULE&lt;/span&gt; - usually &lt;span style="font-style: italic;"&gt;CLASSNAME::METHOD&lt;/span&gt; for me but this is free form.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TYPE&lt;/span&gt; - &lt;span style="font-style: italic;"&gt;Logger.TYPE&lt;/span&gt; enum of Debug, Warn, Error, ....&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;msg&lt;/span&gt; - log message in freeform text.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;addblank&lt;/span&gt; - adds a blank line after this log message.  Usually used before your program shutdown.&lt;br /&gt;&lt;br /&gt;The overloaded versions are all described in the &lt;a href="http://home.columbus.rr.com/klanger/javadoc/stokenutils/"&gt;javadoc&lt;/a&gt; which is downloadable as a zip.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Example&lt;/span&gt;&lt;br /&gt;The following&lt;br /&gt;&lt;pre class="code" style="border-left: 3px solid rgb(204, 204, 204); padding: 0.5em; margin-left: 2em; font-family: courier new;"&gt;Logger.writeLog("PROGNAME","CLASS::METHOD",TYPE.Debug,"Message",false);&lt;br /&gt;&lt;/pre&gt;You will end up with a file called PROGNAME.log with the following values:&lt;br /&gt;&lt;pre class="code" style="border-left: 3px solid rgb(204, 204, 204); padding: 0.5em; margin-left: 2em; font-family: courier new;"&gt;&lt;br /&gt;2007-04-14 00:37:13 [Debug](CLASS::METHOD) Message&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;File Location&lt;/span&gt;&lt;br /&gt;The location where the log files are written can be controlled using several static members.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LOG_FILE_DIR&lt;/span&gt; - path to log location like /tmp/logs&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LOG_BACKUP_DIR&lt;/span&gt; - subdirectory where backups are automatically written (default is  "backuplogs/")&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LOG_FILE_EXT&lt;/span&gt; - extension to add to log file name.  (default is ".log")&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;Behavior&lt;/span&gt;&lt;br /&gt;When using Logger, you can expect it to create a backup of your log each day.  The backups are placed in the directory pointed to by LOG_BACKUP_DIR.  The current log will be appended to always so no data is lost.&lt;br /&gt;&lt;br /&gt;I personally like to create a constant in each class called CLASSNAME and a second constant in each method called METHOD.  For my MODULE parameter, I can then pass CLASSNAME + "::" + METHOD each time I want to write a log line.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Final Thoughts&lt;/span&gt;&lt;br /&gt;I have found this logger to be useful and have used it in many projects (big and small).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8508086504802303915-6666705814015964003?l=stoken-projects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stoken-projects.blogspot.com/feeds/6666705814015964003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8508086504802303915&amp;postID=6666705814015964003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/6666705814015964003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/6666705814015964003'/><link rel='alternate' type='text/html' href='http://stoken-projects.blogspot.com/2007/04/stoken-utils-logger.html' title='stoken-utils logger'/><author><name>uuklanger</name><uri>http://www.blogger.com/profile/14618539429202133895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_-pSEC4XHesg/STi7xOU17SI/AAAAAAAAADc/YDktvrh5FC8/S220/spain.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8508086504802303915.post-5974110457268707233</id><published>2007-03-28T18:05:00.000-04:00</published><updated>2007-04-10T23:03:06.224-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='INTRODUCTION'/><title type='text'>Introduction</title><content type='html'>&lt;span style="font-family: trebuchet ms;font-family:courier new;" &gt;Now and then I have various projects I work on. Most of them are technical (programming typically). I plan on using this as a bit of a journal describing my project, their status, and any things that may come up as I complete them.&lt;br /&gt;&lt;br /&gt;Expect an occasional rant to :-)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8508086504802303915-5974110457268707233?l=stoken-projects.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stoken-projects.blogspot.com/feeds/5974110457268707233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8508086504802303915&amp;postID=5974110457268707233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/5974110457268707233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8508086504802303915/posts/default/5974110457268707233'/><link rel='alternate' type='text/html' href='http://stoken-projects.blogspot.com/2007/03/introduction.html' title='Introduction'/><author><name>uuklanger</name><uri>http://www.blogger.com/profile/14618539429202133895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_-pSEC4XHesg/STi7xOU17SI/AAAAAAAAADc/YDktvrh5FC8/S220/spain.jpg'/></author><thr:total>0</thr:total></entry></feed>
