Skip to content

Commit

Permalink
msg
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Apr 22, 2024
1 parent 1e6155c commit 53224ff
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/compojure/api/meta.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 53224ff

Please sign in to comment.