Re: Print only by clojure code

2012-02-10 Thread Simone Mosciatti
Hi Tassilo, i tried your macro and its work perfectly, thank you. On 9 Feb, 01:57, Tassilo Horn wrote: > Cedric Greevey writes: > > Hi Cedric, > > >> Just in case the java lib in fact uses System.out/err directly, one > >> can redirect standard out and error to something else. > > >> (with-open

Re: Print only by clojure code

2012-02-10 Thread Simone Mosciatti
Hi Tassilo, i tried your macro and its work perfectly, thank you. On 9 Feb, 01:57, Tassilo Horn wrote: > Cedric Greevey writes: > > Hi Cedric, > > >> Just in case the java lib in fact uses System.out/err directly, one > >> can redirect standard out and error to something else. > > >> (with-open

Re: Print only by clojure code

2012-02-08 Thread Tassilo Horn
Cedric Greevey writes: Hi Cedric, >> Just in case the java lib in fact uses System.out/err directly, one >> can redirect standard out and error to something else. >> >> (with-open [w (clojure.java.io/writer "/dev/null")] >>  (binding [*out* w, *err* w] >>    (.noisyJavaCall1 1 2 3) >>    (.noisy

Re: Print only by clojure code

2012-02-08 Thread Cedric Greevey
On Wed, Feb 8, 2012 at 3:15 PM, Tassilo Horn wrote: > Mark Rathwell writes: > >> It's logging, and assuming the logging implementation it is using >> log4j, > > Why do you know that from the information given? > > Just in case the java lib in fact uses System.out/err directly, one can > redirect

Re: Print only by clojure code

2012-02-08 Thread Mark Rathwell
Tassilo: I don't know it , but it is the most likely probability. One would hope that if a library is dumping to the console, or anywhere, it is done through a standard logging lib configurable by the client. If it turned out not to be the case, it would be evident quickly, and then try other p

Re: Print only by clojure code

2012-02-08 Thread Tassilo Horn
Mark Rathwell writes: > It's logging, and assuming the logging implementation it is using > log4j, Why do you know that from the information given? Just in case the java lib in fact uses System.out/err directly, one can redirect standard out and error to something else. (with-open [w (clojure.

Re: Print only by clojure code

2012-02-08 Thread Benny Tsai
Piggy-backing off Mark's answer, if it is log4j that's being used, you can also use log4j.properties to set different logging levels for your Java code vs. your Clojure code (assuming the code are in different packages): http://stackoverflow.com/questions/3569395/filtering-out-log4j-messages-fro

Re: Print only by clojure code

2012-02-08 Thread Mark Rathwell
It's logging, and assuming the logging implementation it is using log4j, you can specify the logging properties in a properties file, as system properties, or set the properties in code. The easiest way is to place a file called log4j.properties on the classpath (in the resources directory of your

Print only by clojure code

2012-02-08 Thread Simone Mosciatti
Hi guys, I have developed a very very little application in clojure that use an external lib in java that i prefer do not touch. The problem is that this lib for some weird reason (debug i guess) print at video a bunch of information useless for me, there is any way to avoid this problem, i mean