Re: N00B Java Question

2009-11-25 Thread devender
user=> (import '(java.util.logging Logger Level)) nil user=> (def my-logger (Logger/getLogger "mylogger")) #'user/my-logger user=> (. my-logger setLevel Level/WARNING) nil user=> (. my-logger warning "this is a warning") Nov 25, 2009 5:38:25 AM sun.reflect.NativeMethodAccessorImpl invoke0 WARNING:

Re: N00B Java Question

2009-11-25 Thread opus111
Wow! Many thanks for all the replies :-D If there are any speech recognition enthusiasts out there, this code is part of a Clojure example for Sphinx4. http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx/trunk/sphinx4/src/scripts/clojure/ClojureTranscriber.clj?view=markup Suggestions/improvem

Re: N00B Java Question

2009-11-24 Thread dannyo152
Peter: I recommend pages 60-62 in Stuart's book for demonstrating how to do this. The notes about (. Math PI) or Math/PI (equivalent notations) are very much to point. To demonstrate: ;first the import user=> (import '(java.util.logging Logger Level)) nil ;create a logger user=> (def our-logger

Re: N00B Java Question

2009-11-24 Thread Meikel Brandmeyer
Hi, Am 24.11.2009 um 22:39 schrieb Peter Wolf: Logger.getLogger("").setLevel(Level.WARNING) (.setLevel (Logger/getLogger "") Level/WARNING) Methods: obj.method(args) => (.method obj args) Static methods: Class.method(args) => (Class/method args) Static members: Class.MEMBER => Class/MEMBER

Re: N00B Java Question

2009-11-24 Thread David Brown
On Tue, Nov 24, 2009 at 04:39:38PM -0500, Peter Wolf wrote: >Here is a N00B question, but I can not find the answer by Googling, or >reading Stuart's book. So, I assume that others will want to find this >FAQ in the future. I think it's also change a bit since the book. >I am calling legacy cod

Re: N00B Java Question

2009-11-24 Thread Sean Devlin
Static field are accessed with the / operator user=>(import (java.util.logging Logger Level)) user=>(let [a-logger (Logger/getLogger "")] (.setLevel a-logger Level/WARNING)) Or, this could be chained as user=>(.setLevel (Logger/getLogger "") Level/WARNING) Hope this helps, Sean On Nov

Re: N00B Java Question

2009-11-24 Thread Christophe Grand
Hi, On Tue, Nov 24, 2009 at 10:39 PM, Peter Wolf wrote: > Here is a N00B question, but I can not find the answer by Googling, or > reading Stuart's book. So, I assume that others will want to find this > FAQ in the future. > > I am calling legacy code, and I need to set the level on the Java Lo

N00B Java Question

2009-11-24 Thread Peter Wolf
Hi all, Here is a N00B question, but I can not find the answer by Googling, or reading Stuart's book. So, I assume that others will want to find this FAQ in the future. I am calling legacy code, and I need to set the level on the Java Logger. In Java it would look like this import java.ut