Updated README to reflect changes to handling of context

parent 78d08f6e
......@@ -117,11 +117,14 @@ find there. If you are seeing some components not using `envelope`, try using
### Context
`Timbre`'s `with-context` is exposed as a top-level symbol in `Envelope`. The
preset ELK format will output the `xRequestId` and `thread` fields when
`:x-request-id` or `:thread` are set in the context. The default non-elk
(console) format will print the x-request-id field when present. Consider the
following:
`Timbre`'s `with-context` is exposed as a top-level symbol in `Envelope`. Any
fields on the context map will converted to camel case and included in the log
entry when using ELK format logging. You will need to make sure that any value
you put in the context map is a legal value according to the NSD ELK schema when
using ELK format logging.
The default non-elk (console) format will print the x-request-id field from the
context when present. Consider the following:
```clojure
(ns no.nsd.your-app
......
(defproject no.nsd/envelope "0.1.4"
(defproject no.nsd/envelope "0.1.5"
:description "A thin wrapper around taoensso.timbre with built in settings for logging to NSD's ELK stack"
:url "https://gitlab.nsd.no/clojure/envelope"
:license {:name "Eclipse Public License"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment