Redact secrets from startup error logs #4
@@ -19,9 +19,12 @@
|
||||
;; log uncaught exceptions in threads
|
||||
(Thread/setDefaultUncaughtExceptionHandler
|
||||
(fn [thread ex]
|
||||
(log/error {:what :uncaught-exception
|
||||
:exception ex
|
||||
:where (str "Uncaught exception on" (.getName thread))})))
|
||||
;; Integrant exceptions include component configuration in ex-data. Logging
|
||||
;; the exception object can therefore disclose database or cookie secrets.
|
||||
(log/error {:what :uncaught-exception
|
||||
:exception-class (.getName (class ex))
|
||||
:message (.getMessage ex)
|
||||
:where (str "Uncaught exception on " (.getName thread))})))
|
||||
|
||||
|
||||
(defonce system (atom nil))
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
[clojure.test :refer [deftest is]]
|
||||
[pmagnus.elprice.core :as core]))
|
||||
|
||||
|
||||
(deftest system-state-is-managed-in-an-atom
|
||||
(is (instance? clojure.lang.Atom core/system)))
|
||||
|
||||
Reference in New Issue
Block a user