-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
This article will work through an easy to encounter yet easy to avoid pitfall that can occur with clojure.core.logging, the de facto logging facade for Clojure projects. I'll build up an example project that will mimic a real world scenario brought down to just its basics.
Let's setup a basic project that includes a logger. I think the nicest way to get a new project up is with one of the tools that Borkdude has created, called neil. If you have this installed, just run the following in an empty directory:
I'm going to leave tooling out of this and run everything through a repl on the command line right from the jar. One other thing I want to do is include the incredible criterium library so we can profile. I'm deliberately including criterium separately like this because you shouldn't have a dev-time tool like criterium in an uberjar. And knowing how to easily combine other jars with your real production jar can be very helpful. I grabbed the jar from my .m2 cache.
A really nice dev experience is if your editor can connect to socket repls. Doing this makes running a repl from a jar or from your regular "dev" setup almost indistinguishable. I can easily repl from a prod jar as from a branch in Clojure and my workflow is exactly the same because I use inf-clojure