A logging library for the Duct framework.
To install, add the following to your project :dependencies
:
[duct/logger "0.3.0"]
To use this library, you'll need an implementation of the
duct.logger/Logger
protocol. You can implement this yourself, or
use a pre-written one, such as logger.timbre.
Once you have a logger, you can use the duct.logger/log
macro. Logging in Duct is data-driven, and has three parts:
For example, instead of writing something like this:
(info "Starting server on port" port)
We instead write something like:
(log logger :info ::starting-server {:port port})
The use of keywords and data structures produces logs that can be queried more efficiently and consistantly than logs written in English.
Copyright © 2018 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close