Liking cljdoc? Tell your friends :D


CircleCI codecov Clojars Project cljdoc badge

Dialog is a simple and opinionated logging library that implements an SLF4J-compatible backend in Clojure. This means it is compatible with a wide variety of logging APIs, including and most Java libraries.

Inspired by the fallout from the log4shell vulnerability, and the question "what if we wrote just enough code to do the kinds of logging we want?". This is an attempt to produce a minimally-configurable logging backend that is nonetheless still extensible in a few ways - in particular, it aims to be easy to integrate with ken as an extension to observability tooling.


Releases are published on Clojars. You can use the latest Maven coordinate, or point at the main branch using deps.edn.

By default, this will pull in the SLF4J API package as well as redirecting java.util.logging and commons-logging classes to SLF4J. If you're using libraries developed against log4j, you may also want to add a dependency on org.slf4j/log4j-over-slf4j as well. For more information, see the SLF4J legacy bridging documentation.

Within your code, you can use the standard approach to logging and things should Just Work. If for some reason you don't want to pull in org.clojure/tools.logging, the dialog.logger namespace contains a set of compatible macros such as logp, debug, infof, etc.

The dialog.logger namespace also contains a number of utility functions which can be used to inspect and dynamically adjust the logging configuration at runtime.


At initialization time, dialog will try to read configuration from a resource named dialog.edn. This is an aero file which should contain a map telling dialog how to behave. See the configuration docs for more information, or check out the sample config in this repo for a comprehensive example.


This library uses Clojure's CLI and deps.edn to manage and build the project. See the development docs for detailed instructions.


Copyright © 2022 Amperity, Inc.

Distributed under the MIT License.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close