An open API service indexing awesome lists of open source software.

https://github.com/lagenorhynque/duct.module.cambium

Duct module for Cambium, a library for structured (JSON) logging in Clojure
https://github.com/lagenorhynque/duct.module.cambium

cambium clojure duct logging

Last synced: 4 months ago
JSON representation

Duct module for Cambium, a library for structured (JSON) logging in Clojure

Awesome Lists containing this project

README

          

# duct.module.cambium

[![Clojars Project](https://img.shields.io/clojars/v/duct.module.cambium.svg)](https://clojars.org/duct.module.cambium)
[![Circle CI](https://circleci.com/gh/lagenorhynque/duct.module.cambium.svg?style=shield)](https://circleci.com/gh/lagenorhynque/duct.module.cambium)
[![codecov](https://codecov.io/gh/lagenorhynque/duct.module.cambium/branch/master/graph/badge.svg)](https://codecov.io/gh/lagenorhynque/duct.module.cambium)

A Duct module that adds logging to a configuration, using [Cambium](https://cambium-clojure.github.io/). This is an alternative to [duct/module.logging](https://github.com/duct-framework/module.logging).

## Installation

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

```clj
[duct.module.cambium "1.3.1"]
```

## Usage

To add this module to your configuration, add a reference to `:duct.module/cambium`:

```edn
{: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 {}}
```

- `:duct.module/cambium` can have one option:
- `:top-level-field`: top-level field name for nested data of MDC map (default: `:option`)

And add `logback.xml` (or `logback-test.xml`) as below to the resource path.

```xml






true


yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
UTC
true





```

## Examples

- [lagenorhynque/clj-rest-api](https://github.com/lagenorhynque/clj-rest-api): an example REST API based on [Pedestal](https://github.com/pedestal/pedestal) & Duct
- [lagenorhynque/aqoursql](https://github.com/lagenorhynque/aqoursql): an example GraphQL API based on [Lacinia-Pedestal](https://github.com/walmartlabs/lacinia-pedestal) & Duct
- [lagenorhynque/route-guide](https://github.com/lagenorhynque/route-guide): an example gRPC API based on [Protojure](https://github.com/protojure/lib), Pedestal & Duct

## License

Copyright © 2019 Kent OHASHI

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.