{"repo":"lukaszkorecki/mokujin","free":true,"listed":false,"github":"https://github.com/lukaszkorecki/mokujin","clone":"git clone https://github.com/lukaszkorecki/mokujin.git","description":"🪵 Structured logging for Clojure. Thin layer on top of clojure.tools.logging with MDC support","language":"Clojure","stars":17,"topics":["clojure","clojure-library","log4j2","logback","logging","logging-library"],"license":"MIT","category":"analytics","readme_excerpt":"Mokujin Mokujin (木人 Wooden person?) is a character in the Tekken series of fighting games. It is a spiritually sensitive animated training dummy, and serves as a guardian of good against supernatural evil threats. Mokujin is made of logs, hence the name. Just enough (structured) logging Quick example Rationalle clojure.tools.logging is a Good Enough :tm: solution for majority of your logging needs. It's fast, works with any logging backend supported on the JVM and is simple to use. The only area where it falls short is producing structured logs. Sidebar: In the past I'd use logfmt -like formatting style when using infof (and friends) to produce logs. Then I'd configure the log ingester (like Fluentd) to parse log lines using this format. That's fine for simple cases, but as soon as exceptions and stack traces got thrown into the mix, I fell into the deep rabbit hole of multi-line log parsers and my sanity never quite made it back. What we want instead is descriptive log messages, with the ability to attach structured data to them. This is where Mapped Diagnostic Context (MDC) comes in. Combined with different logging backends and appenders, we can produce easy to read logs during dev time, and emit logs as data in production. Second part of ensuring that right things are logged and we keep a good performance profile is restricting how logging is done, and what information is included in log events: - prohibit var-arg dispatch - only flat maps are allowed in the log context - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/lukaszkorecki","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lukaszkorecki/mokujin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}