Re: Debugging lazy seqs with log4j

2011-11-11 Thread Alex Baranosky
You could consider contributing your improvements to the logging library. On Nov 11, 2011 10:27 AM, "finbeu" wrote: > Thanks. I think when I tried it (correct me if I'm wrong) it was not > possible to set the debug level dynamic. For instance I usually have a port > where I can send messages to (

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
Thanks. I think when I tried it (correct me if I'm wrong) it was not possible to set the debug level dynamic. For instance I usually have a port where I can send messages to (simple UDP datagram packet), the message string is a map which I read-string and eval and upon that event, I reset some

Re: Debugging lazy seqs with log4j

2011-11-11 Thread Sean Corfield
On Fri, Nov 11, 2011 at 9:25 AM, finbeu wrote: > yes, when starting my project, I was looking at the logging library which > resides (resided) in clojure.contrib and I didn't like it at that point in > time. I think because it was trying to do too many things at once. If my use > case can be solve

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
yes, when starting my project, I was looking at the logging library which resides (resided) in clojure.contrib and I didn't like it at that point in time. I think because it was trying to do too many things at once. If my use case can be solved with some small java wrappers, I try to do it on my

Re: Debugging lazy seqs with log4j

2011-11-11 Thread Sean Corfield
On Fri, Nov 11, 2011 at 8:53 AM, finbeu wrote: > no, not yet. I stick with my own simple logging ns which works nice so far. > Just have to fix this ...) I just wondered whether using a well-maintained "standard" library might be an easier path than rolling your own... > (but I use clojure.java.

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
Yes! That's it. With pr-str it works. Thx!! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To uns

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
Hi Sean no, not yet. I stick with my own simple logging ns which works nice so far. Just have to fix this ...) (but I use clojure.java.jdbc with Sybase ASE 15.0.3. I hope I will find some time soon to contribute some testcases.) Finn -- You received this message because you are subscribed to

Re: Debugging lazy seqs with log4j

2011-11-11 Thread Meikel Brandmeyer (kotarak)
Hi, what happens is probable that the logger tries to turn the lazy seq object itself into a string. Try calling pr-str on the seq before passing it to debug: (debug (pr-str your-seq-object)). Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Cloju

Re: Debugging lazy seqs with log4j

2011-11-11 Thread Sean Corfield
Have you tried clojure.tools.logging to see whether you get the same behavior? On Fri, Nov 11, 2011 at 8:15 AM, finbeu wrote: > Hello, > I'm using log4j and have some a simple wrappers in clojure that work well so > far. > Actually, I do > (def *logger* (Logger/getRootLogger)) > > Then I set logl

Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
Hello, I'm using log4j and have some a simple wrappers in clojure that work well so far. Actually, I do (def *logger* (Logger/getRootLogger)) Then I set loglevel, appenders, layout and so on. I have a function (defn debug [msg] (.debug *logger* msg) This works nice as long as I do not tr