From 63fae9cc340f513bdb7eca9f10716a02929188cb Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Thu, 15 Nov 2018 00:50:47 -0800 Subject: [PATCH 1/2] Put ring-devel back in main dependencies It's needed in prod for the ring-stacktrace middleware --- project.clj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/project.clj b/project.clj index a0f77fd..02f53f4 100644 --- a/project.clj +++ b/project.clj @@ -2,11 +2,12 @@ :description "Pronoun.is is a website for personal pronoun usage examples" :url "https://pronoun.is" :license "GNU Affero General Public License 3.0" - :dependencies [[org.clojure/clojure "1.9.0"] - [compojure "1.6.1"] - [ring/ring-jetty-adapter "1.7.1"] + :dependencies [[compojure "1.6.1"] [environ "1.1.0"] - [hiccup "1.0.5"]] + [hiccup "1.0.5"] + [org.clojure/clojure "1.9.0"] + [ring/ring-devel "1.7.1"] + [ring/ring-jetty-adapter "1.7.1"]] :min-lein-version "2.0.0" :plugins [[environ/environ.lein "0.2.1"] [lein-ring "0.9.7"]] @@ -14,6 +15,5 @@ :uberjar-name "pronouns-standalone.jar" ;; FIXME morgan.astra <2018-11-14 Wed> ;; Is this production profile used for anything? - :profiles {:production {:env {:production true}} - :test {:dependencies [[ring/ring-devel "1.7.1"]]}} + :profiles {:production {:env {:production true}}} :ring {:handler pronouns.web/app}) From d8eaeb2eb9b2dbb679a280f2e5ec92ce1f5a7c5e Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Thu, 15 Nov 2018 01:01:43 -0800 Subject: [PATCH 2/2] Make logger middleware work again --- project.clj | 1 + src/pronouns/web.clj | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/project.clj b/project.clj index 02f53f4..dcd42d5 100644 --- a/project.clj +++ b/project.clj @@ -5,6 +5,7 @@ :dependencies [[compojure "1.6.1"] [environ "1.1.0"] [hiccup "1.0.5"] + [lambdaisland/ring.middleware.logger "0.5.1"] [org.clojure/clojure "1.9.0"] [ring/ring-devel "1.7.1"] [ring/ring-jetty-adapter "1.7.1"]] diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index ab887d0..25f8a78 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -21,9 +21,7 @@ [clojure.string :as s] [clojure.java.io :as io] [ring.adapter.jetty :as jetty] - ;; FIXME morgan.astra <2018-11-14 Wed> - ;; make this logger work or use another one - ;; [ring.middleware.logger :as logger] + [ring.middleware.logger :as logger] [ring.middleware.stacktrace :as trace] [ring.middleware.params :as params] [ring.middleware.resource :refer [wrap-resource]] @@ -79,9 +77,7 @@ ;; (wrap-resource "images") wrap-content-type wrap-not-modified - ;; FIXME morgan.astra <2018-11-14 Wed> - ;; make this logger work or use another one - ;logger/wrap-with-logger + logger/wrap-with-logger wrap-error-page wrap-gnu-natalie-nguyen trace/wrap-stacktrace