A Duct module that adds logging to a configuration, using Cambium. This is an alternative to duct/module.logging.
To install, add the following to your project :dependencies
:
[duct.module.cambium "0.1.0"]
To add this module to your configuration, add a reference to :duct.module/cambium
:
{:duct.profile/base
{:duct.core/project-ns some-api
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/cambium {}}
And add logback.xml
(or logback-test.xml
) like below to the resource path.
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="cambium.logback.json.FlatJsonLayout">
<jsonFormatter class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter">
<!-- prettyPrint is probably ok in dev, but usually not ideal in production: -->
<prettyPrint>true</prettyPrint>
</jsonFormatter>
<!-- <context>api</context> -->
<timestampFormat>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</timestampFormat>
<timestampFormatTimezoneId>UTC</timestampFormatTimezoneId>
<appendLineSeparator>true</appendLineSeparator>
</layout>
</encoder>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close