Liking cljdoc? Tell your friends :D

Duct module.logging

Build Status

A Duct module that adds logging to a configuration, using the logger.timbre library.

Installation

To install, add the following to your project :dependencies:

[duct/module.logging "0.3.1"]

Usage

To add this module to your configuration, add a the :duct.module/logging key to your configuration:

{:duct.module/logging {}}

The module adds the :duct.logger/timbre logger to the configuration, and sets up different appenders depending on whether the environment is :development or :production

The environment can be set by the top-level :duct.core/environment key:

{:duct.core/environment :production}

Or by adding an :environment key to the logging module:

{:duct.module/logging {:environment :development}}

In production, the full logs are sent to STDOUT. In development, the logs are sent to the logs/dev.log file, and in a very terse form to STDOUT.

License

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