From 53224ff0a11360da6af33960a417d223924d4818 Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Mon, 22 Apr 2024 11:39:27 -0500 Subject: [PATCH] msg --- src/compojure/api/meta.clj | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compojure/api/meta.clj b/src/compojure/api/meta.clj index 91e84198..36719c0d 100644 --- a/src/compojure/api/meta.clj +++ b/src/compojure/api/meta.clj @@ -910,9 +910,11 @@ _ (when context? (when-not safely-static (when (and static? (not (-> info :public :static))) - (let [coach (or (some-> (System/getProperty "compojure.api.meta.static-context-coach") - edn/read-string) - {:default :print}) + (let [coach (some-> (System/getProperty "compojure.api.meta.static-context-coach") + edn/read-string) + _ (assert (map? coach) + (str "-Dcompojure.api.meta.static-context-coach should be a map, given: " + (pr-str coach))) nsym (ns-name *ns*) mode (or (get coach nsym) (get coach :default) @@ -926,7 +928,9 @@ "use (context ... :static true ...)." "\n\n" "To suppress this message for this namespace use -Dcompojure.api.meta.static-context-coach=" - "{" nsym :off "}")] + "{" nsym :off "}" + (when coach + (str "\n\nCurrent coach config: " (pr-str coach))))] (case coach :off nil :print (println msg)