Skip to content
Logging library for the Duct framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
test/duct Add convenience macros for logging levels Oct 27, 2018
project.clj Release 0.3.0 Oct 28, 2018

Duct logger

Build Status

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:

  1. The logging level
  2. A namespaced keyword that represents the event occurring
  3. A map of relevant event data

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.

You can’t perform that action at this time.