Skip to content

Lumber is a really minimal logging library for Clojure

License

Notifications You must be signed in to change notification settings

omnyway-labs/lumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lumber - another Clojure logging library

Lumber is yet another really minimal logging library for Clojure. It aimed to be compatible with Timbre, but lost interest after a while.

Don’t use it unless you are absolutely desperate for a “do the absolute minimum” logging library. You’ve been warned.

Usage

(require '[lumber.log :as log])

(log/info {:id 1 :message "hello"})
;; 2050-03-05 20:54:33 INFO user:84 {:id 1, :message \"hello\"}

;; thread locally set :serializer to JSON serializer - generally not a
;; good idea to mix different serializers in the same log stream
(log/with-config {:serializer #'kit.util.core/write-json}
  (log/info {:id 1 :message "hello"}))
;; 2050-03-05 20:56:38 INFO user:84 {\"id\":1,\"message\":\"hello\"}

;; globally set the serializer
(log/set-default-config {:serializer #'kit.util.core/write-json})

(log/info {:id 1 :message "hello"})
;; 2050-03-05 20:56:38 INFO user:84 {\"id\":1,\"message\":\"hello\"}

About

Lumber is a really minimal logging library for Clojure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published