Ok the patch file has been languishing on assembla for a few days, so
I've uploaded it to the files section here if anyone wants to use the
latest version.
logging.clj at http://groups.google.com/group/clojure/files
http://groups.google.com/group/clojure/files
On Jul 23, 11:20 am, ataggart
Hmm, I like "spy" since it doesn't mimic a logging level like "debug"
and "trace" do. Making the change now, thanks.
On Jul 23, 11:01 am, Laurent PETIT wrote:
> What about 'spy instead of 'debug ? Or 'trace ?
>
> 2009/7/23 ataggart
>
>
>
>
>
> > Tim is correct. The log macro is what you wan
What about 'spy instead of 'debug ? Or 'trace ?
2009/7/23 ataggart
>
> Tim is correct. The log macro is what you want to use when you're
> really just wanting to log something; in that case the message
> expression won't get evaluated unless the particular logging level is
> enabled.
>
> The de
Tim is correct. The log macro is what you want to use when you're
really just wanting to log something; in that case the message
expression won't get evaluated unless the particular logging level is
enabled.
The debug function is for when you want to execute an expression
regardless, but would a
Thanks for the explanation, that makes sense.
2009/7/23 Timothy Pratley
>
> Hi Laurent,
>
> I believe using
> (log :fine (expensive-calc))
> will do precisely what you describe (not do anything unless
> level :fine is enabled, and return nil)
>
> (debug (some-expr)) is intended when you want
Hi Laurent,
I believe using
(log :fine (expensive-calc))
will do precisely what you describe (not do anything unless
level :fine is enabled, and return nil)
(debug (some-expr)) is intended when you want to leave the logic
precisely as is but display part of the calculation;
(+ a b (- c d))
;
Hello,
2009/7/23 ataggart
>
> Ok, I've updated the code with some of Tim's code:
> http://paste.lisp.org/display/84053
>
> The "public" functions/macros are:
>
> enabled? [level] [level log-name]
> true/false whether that level is enabled for the current namespace
> or log-name
>
> log [level m
Ok, I've updated the code with some of Tim's code:
http://paste.lisp.org/display/84053
The "public" functions/macros are:
enabled? [level] [level log-name]
true/false whether that level is enabled for the current namespace
or log-name
log [level message ...]
logs the message either directly
Tim, you're too modest. I'm incorporating some of your stuff now.
I'll update once it's done.
On Jul 22, 12:04 am, Timothy Pratley wrote:
> Hi Alex,
>
> You've got my vote - logging is essential for non-trivial programs.
>
> Your implementation is superior to mine, but maybe you would like to
Yeah, I'd like to see something like this in clojure-contrib. One of
the problems that java systems routinely have is mismatches between
the assumed logging system. This is a real pain when it comes up and
it would be nice to have that taken care of by an abstraction layer.
Tom
On Jul 21, 10:13
Hi Alex,
You've got my vote - logging is essential for non-trivial programs.
Your implementation is superior to mine, but maybe you would like to
include some sub-parts:
http://github.com/timothypratley/strive/blob/baf83e2bb26662f5f5049d165dec31e47b91e171/clj/timothypratley/logging.clj
log-capt
11 matches
Mail list logo