Fork me on GitHub
#observability
<
2020-06-12
>
athomasoriginal11:06:29

Do you have an example of what your deps.edn logging deps looks like, Sean? I’ve been setting up a new project and as plexus noted in his post, there are so many deps required to set everything up for logging its indeed confusing to know whats required. My current setup is based off stuart’s clojure.dev logging setup.

sveri12:06:30

This is what I currently have, just two dependencies, although it's log4j 1: https://pastebin.com/sQbAHQne It logs into a file and the console.

ataggart16:06:38

@U04V70XH6 What's the use case for logged-future? I didn't find any documentation, but I infer it's just wrapping future around a logging call.

seancorfield17:06:59

@U0677JTQX Since we were switching away from Timbre, we figured we might as well use the most modern logging library (2 over 1).

👍 3
seancorfield17:06:08

@U6GNVEWQG

;; use log4j 2.x:
    org.apache.logging.log4j/log4j-api {:mvn/version "2.13.3"}
    ;; bridge into log4j:
    org.apache.logging.log4j/log4j-1.2-api {:mvn/version "2.13.3"}
    org.apache.logging.log4j/log4j-jcl {:mvn/version "2.13.3"}
    org.apache.logging.log4j/log4j-jul {:mvn/version "2.13.3"}
    org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.13.3"}

seancorfield17:06:58

@U5ZNLFCQ7 It means we can just replace future with logged-future everywhere and not have to worry about adding in code everywhere to get this:

(future
  (try
    ,,, body ,,,
  (catch Throwable t
    (logger/error t))))

👍 3
plexus07:06:53

Thanks a lot everyone for contributing to the conversation. I learned a few things, and I'll be updating the post!

hindol19:06:38

Hi everyone, what are some good books on observability?

Cory19:06:09

https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/0988262592 is also good if you want something that covers more of the human side of things.