Skip to content

Convenience functions on top of a timbre configuration which are useful for the SkyBet Data team

Notifications You must be signed in to change notification settings

garethmdavies/timbre-util

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

timbre-util

Convenience functions on top of a timbre configuration which are useful for the SkyBet Data team.

Install


Add the following entry to the :dependencies vector of your project.clj file:

[clojars version] (https://clojars.org/ccfontes/timbre-util)

Usage


Toggling logs on or off:

user=> (require '[timbre-util.log :as log])
nil

user=> (log/set-config!)
;{:level :debug, :output-fn #<timbre$default_output_fn taoensso.timbre$default_output_fn@17870ed0>, :appenders {:color-appender {:enabled? false, :async? false, :min-level nil, :rate-limit nil, :output-fn :inherit, :fn #<log$fn__2628$fn__2630 timbre_util.log$fn__2628$fn__2630@58235e48>}}}

user=> (info "flapjacks are yummy")
; default is to not print anything
nil

user=> (log/toggle!) ; toggles logging on
true

user=> (info "brownies ♡")
; 16-01-25 11:58:07 hungryman-MacBook-Pro.local INFO [skybet.some.ns] - brownies ♡

user=> (log/timbre! false) ; disables logging regardless if it's enabled or not
false

Features


Running (config-timbre!) will do the following:

  • set up beautiful colors for different levels of logging
  • disable logging until you run (toggle!)
  • Toggling logs on or off

Wishlist


  • project.clj config:
    • change colors
    • change enable logging default
    • inject utility fns on clojure.core for convenience

License


Copyright (C) 2016 Sky Betting and Gaming.

Released under The MIT License (MIT).

About

Convenience functions on top of a timbre configuration which are useful for the SkyBet Data team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%