replikativ / kabel

A library for simple wire-like connectivity semantics.
Eclipse Public License 1.0
102 stars 5 forks source link

option to set verbosity of logging #6

Open benjiqq opened 6 years ago

benjiqq commented 6 years ago

how to set logging in the ping-pong example - it is info by default?

whilo commented 6 years ago

kabel uses https://github.com/ptaoussanis/timbre

you can try: timbre/set-level!

benjiqq commented 6 years ago

looks like needs some extra code if one wants to filter, the following works for now https://github.com/ptaoussanis/timbre/issues/138


(timbre/merge-config!
  {:appenders
   {:println
    {:fn (let [logger-factory (clojure.tools.logging.impl/find-factory)
               logger (clojure.tools.logging.impl/get-logger logger-factory *ns*)]          
           (fn [data]
             ;do nothing (clojure.tools.logging/log* logger (:level data) (:?err data) (force (:output_ data)))
             )
           )}}})