From 452332e90032350b5428488f77536e15fd50a9c4 Mon Sep 17 00:00:00 2001 From: Kjetil Thuen Date: Fri, 26 Oct 2018 14:06:42 +0200 Subject: [PATCH] Updated README to reflect changes to handling of context --- README.md | 13 ++++++++----- project.clj | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 52eb861..5c1d610 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/project.clj b/project.clj index ae3a934..c5a3e83 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(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" -- 2.26.2