From a7b41a6f2debb078253f5e87d3b10121e9ff83b8 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Fri, 1 Feb 2013 15:05:50 +0700 Subject: [PATCH] Add `middleware` dev notes --- src/taoensso/timbre.clj | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/taoensso/timbre.clj b/src/taoensso/timbre.clj index 8ae5a7a..669e76c 100644 --- a/src/taoensso/timbre.clj +++ b/src/taoensso/timbre.clj @@ -65,6 +65,17 @@ :ns-whitelist [] :ns-blacklist [] + ;; TODO Generalized transformation/filtering unary fns to operate on + ;; logging requests to either either filter or transform logging + ;; messages (e.g. obscure security credentials). + ;; + ;; Could use a cacheable comp/juxt and include ns white/black list + ;; functionality? Possibly even just prepend to the regular appender + ;; juxt (assuming we keep ns filtering separate)? Note that this'd + ;; also make any additional middlware cost async-able. + ;; + ;; :middleware [] + ;;; Control :timestamp format :timestamp-pattern "yyyy-MMM-dd HH:mm:ss ZZ" ; SimpleDateFormat pattern :timestamp-locale nil ; A Locale object, or nil @@ -225,7 +236,7 @@ (apply juxt)))))))) (reset! appenders-juxt-cache))) -;;; Namespace filter ; TODO Generalize to arbitrary fn filters? +;;; Namespace filter ; TODO Generalize to arbitrary configurable middleware juxt? (def ns-filter-cache "@ns-filter-cache => (fn relevant-ns? [ns] ...)" (atom (constantly true)))