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
- Host: GitHub
- URL: https://github.com/lagenorhynque/duct.module.cambium
- Owner: lagenorhynque
- License: epl-2.0
- Created: 2019-11-04T10:50:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T17:41:48.000Z (over 2 years ago)
- Last Synced: 2025-10-22T01:20:11.174Z (8 months ago)
- Topics: cambium, clojure, duct, logging
- Language: Clojure
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# duct.module.cambium
[](https://clojars.org/duct.module.cambium)
[](https://circleci.com/gh/lagenorhynque/duct.module.cambium)
[](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.