On Apr 10, 7:48 pm, Paul Legato <pjleg...@gmail.com> wrote:
> Hi,
>
> I'd like to suggest two enhancements to clojure-contrib.logging:
>
> 1) There should be an easy way to set the current log level threshold
> (DEBUG, WARN, etc.)

I'd like that too.  Alas, the complexity of hierarchical logging
libraries, coupled with the fact that they were not designed with
interactivity in mind, leads to a rather painful situation.

For example, if I have namespace foo.bar.baz and foo.bar.bop, what
should happen if I call (set-level! foo.bar :debug)?  For some logging
libraries that might only affect that package, for others every sub-
package would inherit the debug level *except* those packages which
were specifically configured.  Further, many systems allow for
multiple outlets for a given package, each possibly configured with
different logging levels.

Providing a mechanism which is simple, and does what one expects (an
open question) consistently across different backing implementations
is not as easy as it may seem.

That said, please do submit tickets to jira; patches are a bonus.


> 2) The logging/spy macro doesn't print lazy sequences to the log;
> instead, it prints something like "clojure.lang.LazySeq@8592". Since
> the user has explicitly requested that the sequence's value be logged,
> it makes sense to me to run the sequence and log the result.

The version in tools.logging does this via pprint, along with a number
of other improvements (some of them breaking changes from
c.c.logging).

https://github.com/clojure/tools.logging

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to