Add support for any value in context

parent 40518209
......@@ -2,7 +2,7 @@
:deps {org.clojure/clojure {:mvn/version "1.9.0"}
org.clojure/data.json {:mvn/version "0.2.6"}
com.taoensso/timbre {:mvn/version "4.10.0"}
camel-snake-kebab {:mvn/version "0.4.0"}
org.clojure/tools.logging {:mvn/version "0.4.1"}
com.fzakaria/slf4j-timbre {:mvn/version "0.3.12"}
org.slf4j/log4j-over-slf4j {:mvn/version "1.7.14"}
(defproject no.nsd/envelope "0.1.3"
(defproject no.nsd/envelope "0.1.4"
:description "A thin wrapper around taoensso.timbre with built in settings for logging to NSD's ELK stack"
:url ""
:license {:name "Eclipse Public License"
(ns no.nsd.envelope
(:require [clojure.string :as str]
[ :as json]
[camel-snake-kebab.core :refer :all]
[taoensso.timbre :as timbre]
#?(:clj [ :as cljlog])))
......@@ -28,15 +28,11 @@
(some? (:service-stack config))
(assoc :serviceStack (force (:service-stack config)))
(some? (:x-request-id context))
(assoc :xRequestId (:x-request-id context))
(some? (:thread context))
(assoc :thread (:thread context))
(assoc :err (timbre/stacktrace ?err {:stacktrace-fonts {}})))]
(json/write-str output-data)))
(json/write-str (reduce #(assoc %1 (->camelCase %2) (get context %2))
(keys context)))))
(defn local-console-format-fn [data]
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