1. Krešimir Šojat
  2. yummy-log


yummy-log /

Filename Size Date modified Message
28 B
1.4 KB
12.6 KB
227 B
1.0 KB
1.8 KB
Logging library for Clojure.

yummy-log is a simple logging library for Clojure based on slf4j
library (http://www.slf4j.org).

As the library depends only on slf4j-api module, it is up to you to
select the appropriate backend for your project. How to do that you
can consult the slf4j manual(http://www.slf4j.org/manual.html#binding),
all backends are present in central maven repository (required version is 1.5.10).

Backend configuration is not covered by this library and you should use
configuration method provided by a backend you selected.

If you are a Clojars user see http://clojars.org/yummy.log/log for
more info on how to use yummy-log with Clojars repository.

Library contains only five macros with identical syntax. They
are used to log messages with different priority levels, those macros are:
debug, error, info, trace and warn.

Syntax of logger macros is:
  (level format-string string-arguments-or-throwable)

For a quick explanation of how to use parameterized messages see

  (ns example1)
  (require '[yummy.log :as log])

  (defn f1 []
    (info "Function f1 was called"))

  (defn f2 [n]
    (info "Function f2 was called with argument {}" n))

  (f2 10)

Should output when called (using simple backend) something like:
  340097 [main] INFO example1 - Function f1 was called
  353571 [main] INFO example1 - Function f2 was called with argument 10