Skip to content

AlexanderMann/unclogging

Repository files navigation

unclogging

CircleCI

A repo designed to help you unclog your Clojure logging woes

Logging in Clojure can get to be fun when you're messing around with someone else's libraries...especially when those are Java. Things like Java Util Logging, SLF4J, Netty, etc., log out in various ways that you might not realize.

Usage

Pipe all logs to Timbre

(require 'alexandermann.unclogging)
(alexandermann.unclogging/merge-config! {:level :info})

Done. All logs generated by some 3rd party (probably Java) library will be piped through Timbre. To learn how you can better use Timbre, and all the cool stuff it can do, head over there.

Send logs to logstash

(alexandermann.unclogging/merge-config!
  {:level :info
   :logstash {:host "localhost" :port 5044})

That's it. If you happen to try and pass off a host and port which doesn't resolve, we'll let you know via Clojure Spec.

I'm a developer, and I like to log my passwords

Yeah, you probably shouldn't do that...or be a jerk and let your colleagues accidentally do that...

(alexandermann.unclogging/merge-config!
  (alexandermann.unclogging/prevent-hazard
    {:level :info}
    (fn [v] (and (string? v)
                 (= "super secret"))))

About

A repo designed to help you unclog your Clojure logging woes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published