<?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-5337961196710604863</id><updated>2012-02-16T11:52:01.041-08:00</updated><category term='script'/><category term='linux'/><category term='diff'/><category term='branch'/><category term='svn'/><category term='meld'/><category term='mac'/><category term='patch'/><category term='merge'/><title type='text'>Tech</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-3010539413112506544</id><published>2012-02-03T07:04:00.000-08:00</published><updated>2012-02-03T07:16:25.998-08:00</updated><title type='text'>Install from user account protected time capsule</title><content type='html'>When booting from the "Recovery HD", installing from a password protected Time Capsule is not an easy task.&lt;br /&gt;It seems that Lion is not compatible with Time Capsule, or at least not fully compatible.&lt;br /&gt;&lt;br /&gt;This way I got it to work:&lt;br /&gt;From the menu, choose Utilities &amp;gt; Terminal..&lt;br /&gt;&lt;br /&gt;In the terminal, type the following commands:&lt;br /&gt;Note:  leave out the "-bash-3.2#" part, it will be printed automatically for you&lt;br /&gt;Note2: replace the stuff between [] with information that applies to your situation&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;-bash-3.2# mkdir /Volumes/tc&lt;br /&gt;-bash-3.2# mount_afp -i afp://[ip-of-timecapsule]/[username] /Volumes/tc&lt;br /&gt;User: [usename]&lt;br /&gt;Pass: [password]&lt;br /&gt;-bash-3.2# hdiutil mount /Volumes/tc/[username]&lt;username&gt;.sparsebundle&lt;br /&gt;&lt;/username&gt;&lt;/pre&gt;&lt;br /&gt;Now go back to the recovery assistant and there will be an extra disk called "Time Machine Backups".&lt;br /&gt;&lt;br /&gt;Select it as a backup drive and continue the process as normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5337961196710604863-3010539413112506544?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/3010539413112506544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2012/02/install-from-user-account-protected.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/3010539413112506544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/3010539413112506544'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2012/02/install-from-user-account-protected.html' title='Install from user account protected time capsule'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-5513797785004462395</id><published>2011-12-21T01:34:00.000-08:00</published><updated>2011-12-21T01:37:05.221-08:00</updated><title type='text'>You cannot save this document with extension at the end of the name</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-btcatQni8x0/TvGoiyL7grI/AAAAAAAAAmk/vCxYXd3j8_4/s1600/Screen%2BShot%2B2011-12-21%2Bat%2B10.35.46.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 206px;" src="http://2.bp.blogspot.com/-btcatQni8x0/TvGoiyL7grI/AAAAAAAAAmk/vCxYXd3j8_4/s400/Screen%2BShot%2B2011-12-21%2Bat%2B10.35.46.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5688513119886475954" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You cannot save this document with extension “.csv” at the end of the name. The required extension is “.txt”.&lt;br /&gt;You can choose to use both, so that your file name ends in “.csv.txt”.&lt;br /&gt;&lt;br /&gt;Why Apple, why?&lt;br /&gt;Why can't I decide what extension the file will have. I know for certain that .csv is right, .txt is wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5337961196710604863-5513797785004462395?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/5513797785004462395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2011/12/you-cannot-save-this-document-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/5513797785004462395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/5513797785004462395'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2011/12/you-cannot-save-this-document-with.html' title='You cannot save this document with extension at the end of the name'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-btcatQni8x0/TvGoiyL7grI/AAAAAAAAAmk/vCxYXd3j8_4/s72-c/Screen%2BShot%2B2011-12-21%2Bat%2B10.35.46.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-3480092034646191973</id><published>2011-11-25T01:44:00.000-08:00</published><updated>2011-11-25T01:46:55.359-08:00</updated><title type='text'>Omnifocus: Send to inbox</title><content type='html'>If you ar tired of seeing this in all text selection menus, and want to remove the "Omnifocus: Send to inbox" option:&lt;div&gt;Go to System Preferences &amp;gt; Keyboard &amp;gt; Keyboard shortcuts&lt;/div&gt;&lt;div&gt;Look up "Omnifocus: Send to inbox" and remove the tick in front of it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5337961196710604863-3480092034646191973?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/3480092034646191973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2011/11/omnifocus-send-to-inbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/3480092034646191973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/3480092034646191973'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2011/11/omnifocus-send-to-inbox.html' title='Omnifocus: Send to inbox'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-2071328935432594649</id><published>2010-12-17T16:25:00.000-08:00</published><updated>2010-12-17T17:07:39.130-08:00</updated><title type='text'>How to store a SecretKey in Java</title><content type='html'>This demo shows how to maintain a secret (symmetric) key in a java class. This key can then be used for encrypting / decrypting data that should be secret outside that class but must be transported. The Cipher used here is DESede, other ciphers could be used as well.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When using a KeyGenerator each time the class is initialized, the encrypted messages can not be read by a another process. Therefore the SecretKey is generated once, and then revived when the class is loaded.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;** IMPORTANT **&lt;/div&gt;&lt;div&gt;Note that the SecretKey is now in your java source file, and will be in the compilation result. Your secrets can be read by anyone who can access your source or your binaries.&lt;/div&gt;&lt;div&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Generating the key&lt;/h3&gt;&lt;code&gt;SecretKey key = KeyGenerator.getInstance("DESede").generateKey();&lt;br /&gt;BigInteger num = new BigInteger(1, key.getEncoded());&lt;br /&gt;System.out.println("Key: "+ num.toString())&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Copy the resulting string (a big number)&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Making the SecretKey available&lt;/h3&gt;&lt;br /&gt;&lt;code&gt;public class YourClass {&lt;br /&gt; private static String algorithm = "DESede";&lt;br /&gt; private static byte[] encodedKey = new BigInteger("[[[[ Post the big number here ]]]]", 16).toByteArray();&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Using the encoded SecretKey&lt;/h3&gt;&lt;br /&gt;&lt;code&gt;DESedeKeySpec keySpec = new DESedeKeySpec(encodedKey);&lt;br /&gt;SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algorithm);&lt;br /&gt;SecretKey key = keyFactory.generateSecret(keySpec);&lt;br /&gt;&lt;br /&gt;Cipher cipher = Cipher.getInstance(algorithm);&lt;br /&gt;Cipher decipher = Cipher.getInstance(algorithm);&lt;br /&gt;&lt;br /&gt;cipher.init(Cipher.ENCRYPT_MODE, key);&lt;br /&gt;decipher.init(Cipher.DECRYPT_MODE, key);&lt;/code&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Encrypting and decrypting&lt;/h3&gt;&lt;code&gt;&lt;br /&gt;String message = "Hello World";&lt;br /&gt;byte[] encryptedBytes = cipher.doFinal(message.getBytes());&lt;br /&gt;String encryptedMessage = Base64.encode(encryptedBytes);&lt;br /&gt;&lt;br /&gt;// Transport the base64 string, for example over http&lt;br /&gt;&lt;br /&gt;byte[] messageToDecrypt = Base64.decode(encryptedMessage);&lt;br /&gt;byte[] decryptedBytes = decipher.doFinal(messageToDecrypt);&lt;br /&gt;String decryptedMessage = new String(decryptedBytes);&lt;br /&gt;System.out.println(decryptedMessage);&lt;/code&gt;&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;References&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.devx.com/Java/10MinuteSolution/21385/1763/page/2"&gt;http://www.devx.com/Java/10MinuteSolution/21385/1763/page/2&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.herongyang.com/JDK/Secret-Key-Test-Program-JceSecretKeyTest.html"&gt;http://www.herongyang.com/JDK/Secret-Key-Test-Program-JceSecretKeyTest.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.java-tips.org/java-se-tips/javax.crypto/encryption-and-decryption-using-symmetric.html"&gt;http://www.java-tips.org/java-se-tips/javax.crypto/encryption-and-decryption-using-symmetric.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&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/5337961196710604863-2071328935432594649?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/2071328935432594649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2010/12/how-to-store-secretkey-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/2071328935432594649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/2071328935432594649'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2010/12/how-to-store-secretkey-in-java.html' title='How to store a SecretKey in Java'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-124985197520305811</id><published>2010-11-25T01:43:00.000-08:00</published><updated>2010-11-25T03:44:05.133-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='merge'/><category scheme='http://www.blogger.com/atom/ns#' term='meld'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='branch'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><category scheme='http://www.blogger.com/atom/ns#' term='diff'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Merging svn using Meld</title><content type='html'>&lt;div&gt;Meld is a great tool, and it can ease the pain of svn greatly. Unfortunately, until recently (not yet in version 1.3), it did not support a merge result file argument.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But now it does! (still experimental and not officially released)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So how to use it (under linux, or unix compatible systems):&lt;/div&gt;&lt;div&gt;Check if your Meld is &gt; 1.3, if not,&lt;/div&gt;&lt;div&gt;Check &lt;a href="http://meld.sourceforge.net/"&gt;the meld website&lt;/a&gt; to see if Meld &gt; 1.3 is released and install it.&lt;/div&gt;&lt;div&gt;If you got Meld &gt; 1.3 go ahead with "SVN Meld glue".&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Build Meld source&lt;/h2&gt;&lt;br /&gt;Fetch the Meld source and build it using:&lt;br /&gt;&lt;code&gt;cd ~/bin&lt;br /&gt;git clone git://git.gnome.org/meld&lt;br /&gt;cd meld&lt;br /&gt;make&lt;br /&gt;./bin/meld&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If all went fine, you should be running Meld &gt; 1.3 now. Close it off.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;SVN Meld glue&lt;/h2&gt;&lt;br /&gt;Start a text editor.&lt;br /&gt;Write the following to a file named &lt;code&gt;~/bin/svn-merge-meld&lt;/code&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;# svn merge-tool python wrapper for meld&lt;br /&gt;import sys&lt;br /&gt;import subprocess&lt;br /&gt;&lt;br /&gt;# path to meld ($ which meld)&lt;br /&gt;meld = "~/bin/meld/bin/meld"&lt;br /&gt;log = False&lt;br /&gt;f = open('/tmp/svn-merge-meld.log', 'a')&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;if log:&lt;br /&gt;f.write("call: %r\n" % sys.argv)&lt;br /&gt;&lt;br /&gt;# file paths&lt;br /&gt;base   = sys.argv[1]&lt;br /&gt;theirs = sys.argv[2]&lt;br /&gt;mine   = sys.argv[3]&lt;br /&gt;merged = sys.argv[4]&lt;br /&gt;partial = sys.argv[5]&lt;br /&gt;&lt;br /&gt;# the call to meld&lt;br /&gt;cmd = [meld, mine, base, theirs, merged]&lt;br /&gt;&lt;br /&gt;# Call meld, making sure it exits correctly&lt;br /&gt;subprocess.check_call(cmd)&lt;br /&gt;&lt;br /&gt;try:&lt;br /&gt;main()&lt;br /&gt;except Exception as e:&lt;br /&gt;print "Oh noes, an error: %r" % e&lt;br /&gt;if log:&lt;br /&gt; f.write("Error: %r\n" % e)&lt;br /&gt;sys.exit(-1)&lt;/pre&gt;Change the file permissions to +x:&lt;br /&gt;&lt;code&gt;chmod +x ~/bin/svn-merge-meld&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;With the text editor, edit &lt;code&gt;~/.subversion/config&lt;/code&gt;&lt;br /&gt;Locate this section:&lt;br /&gt;&lt;blockquote&gt;### Set merge-tool-cmd to the command used to invoke your external&lt;br /&gt;### merging tool of choice. Subversion will pass 4 arguments to&lt;br /&gt;### the specified command: base theirs mine merged&lt;br /&gt;# merge-tool-cmd = merge_command&lt;/blockquote&gt;Add this below it:&lt;br /&gt;&lt;code&gt;merge-tool-cmd = ~/bin/svn-merge-meld&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Usage&lt;/h2&gt;&lt;br /&gt;&lt;pre&gt;svn merge -r 14829:HEAD http://path/to/trunk my/branch&lt;br /&gt;Select: (p) postpone, (df) diff-full, (e) edit, (r) resolved,&lt;br /&gt;  (mc) mine-conflict, (tc) theirs-conflict,&lt;br /&gt;  (s) show all options:&lt;/pre&gt;Press &lt;code&gt;&lt;span class="Apple-style-span"&gt;l-Enter&lt;/span&gt;&lt;/code&gt; (the letter L) to fire up Meld.&lt;/div&gt;&lt;div&gt;In this case:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;the left side is the change in my/branch&lt;/li&gt;&lt;li&gt;the middle part is the merge result which you can edit&lt;/li&gt;&lt;li&gt;the right side are the changes in the trunk&lt;/li&gt;&lt;/ul&gt;Merge, save and quit, then in the console press &lt;code&gt;r-Enter&lt;/code&gt;, and your done. (Almost) painless merging in svn!&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;References&lt;/h2&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://meld.sourceforge.net/"&gt;Meld&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugzilla.gnome.org/show_bug.cgi?id=578613"&gt;Piotr Piastucki's Meld patch&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://codingundertheinfluence.blogspot.com/2010/01/using-meld-as-your-external-diff3.html"&gt;John's earlier svn-meld integration script&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5337961196710604863-124985197520305811?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/124985197520305811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2010/11/merging-svn-using-meld.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/124985197520305811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/124985197520305811'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2010/11/merging-svn-using-meld.html' title='Merging svn using Meld'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5337961196710604863.post-8118185220303076776</id><published>2010-11-19T09:52:00.000-08:00</published><updated>2010-11-19T10:00:28.582-08:00</updated><title type='text'>How to change the logging facility in java from org.apache.commons.logging.Log to java.util.logging.Logger;</title><content type='html'>&lt;h2&gt;&lt;span class="Apple-style-span"&gt;With a shellscript and some Perl of course!&lt;/span&gt;&lt;/h2&gt;&lt;code&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Note 1: make a backup.&lt;br /&gt;# Note 2: check result and edit manually&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/([\s\t](?:(?:private|static|final)[\s\t]+)*)Log(\s+\w+\s+=\s+)LogFactory.getLog\(\s*([^.]+)\.class\s*\)/${1}Logger${2}Logger.getLogger($3.class.getName())/' \{\} \;&lt;br /&gt;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/(import\s+)org.apache.commons.logging.Log\s*;\s*(\r?\n)/import java.util.logging.Logger;$2import java.util.logging.Level;$2/' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/import\s+org.apache.commons.logging.LogFactory\s*;\s*\r?\n//' \{\} \;&lt;br /&gt;&lt;br /&gt;#isWarnEnabled&lt;br /&gt;#isInfoEnabled&lt;br /&gt;#isDebugEnabled&lt;br /&gt;#isTraceEnabled&lt;br /&gt;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.isWarnEnabled\(\)/log.isLoggable(Level.WARNING)/g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.isInfoEnabled\(\)/log.isLoggable(Level.INFO)/g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.isDebugEnabled\(\)/log.isLoggable(Level.FINE)/g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.isTraceEnabled\(\)/log.isLoggable(Level.FINER)/g' \{\} \;&lt;br /&gt;&lt;br /&gt;#fatal&lt;br /&gt;#error&lt;br /&gt;#warn&lt;br /&gt;#info&lt;br /&gt;#debug&lt;br /&gt;#trace&lt;br /&gt;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.fatal\(/log.log(Level.SEVERE, /g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.error\(/log.log(Level.WARNING, /g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.warn\(/log.log(Level.WARNING, /g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.info\(/log.log(Level.INFO, /g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.debug\(/log.log(Level.FINE, /g' \{\} \;&lt;br /&gt;find . -name \*.java -exec perl -pi -e's/log.trace\(/log.log(Level.FINER, /g' \{\} \;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5337961196710604863-8118185220303076776?l=berikontech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://berikontech.blogspot.com/feeds/8118185220303076776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://berikontech.blogspot.com/2010/11/how-to-change-logging-facility-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/8118185220303076776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5337961196710604863/posts/default/8118185220303076776'/><link rel='alternate' type='text/html' href='http://berikontech.blogspot.com/2010/11/how-to-change-logging-facility-in-java.html' title='How to change the logging facility in java from org.apache.commons.logging.Log to java.util.logging.Logger;'/><author><name>Berik</name><uri>http://www.blogger.com/profile/00296629866139548565</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
