Commit 5d6041df authored by Johannes Knödtel's avatar Johannes Knödtel 🎶
Browse files

use instead of timbre

fixes #33
parent 9a75cb25
......@@ -5,8 +5,7 @@
:dependencies [[org.clojure/clojure "1.8.0"]
[selmer "1.10.3"]
[com.taoensso/timbre "4.8.0"]
[com.taoensso/tower "3.0.2"]
[org.clojure/tools.logging "0.3.1"]
[markdown-clj "0.9.91"]
[environ "1.1.0"]
[compojure "1.5.1"]
......@@ -2,7 +2,6 @@
(:require [gms.handler :refer [app init destroy parse-port]]
[luminus.http-server :as http]
[luminus-migrations.core :as migrations]
[taoensso.timbre :as timbre]
[environ.core :refer [env]])
......@@ -2,7 +2,6 @@
[ :as jdbc]
[conman.core :as conman]
[taoensso.timbre :as timbre]
[environ.core :refer [env]])
(:import java.sql.BatchUpdateException))
......@@ -5,8 +5,7 @@
[gms.middleware :as middleware]
[gms.db.core :as db]
[compojure.route :as route]
[taoensso.timbre :as timbre]
[taoensso.timbre.appenders.3rd-party.rotor :as rotor]
[ :as log]
[selmer.parser :as parser]
[environ.core :refer [env]]
[ :as nrepl]))
......@@ -33,9 +32,9 @@
(nrepl/start-server :port)
(reset! nrepl-server))
(timbre/info "nREPL server started on port" port)
(log/info "nREPL server started on port" port)
(catch Throwable t
(timbre/error "failed to start nREPL" t)))))
(log/error "failed to start nREPL" t)))))
(defn stop-nrepl []
(when-let [server @nrepl-server]
......@@ -48,18 +47,11 @@
put any initialization code here"
{:level (if (env :dev) :trace :info)
:appenders {:rotor (rotor/rotor-appender
{:path "notice me, logpi"
:max-size (* 512 1024)
:backlog 10})}})
(if (env :dev) (parser/cache-off!))
;;start the expired session cleanup job
(timbre/info (str
(log/info (str
"\n-=[Grill me Senpai!!! started successfully"
(when (env :dev) " using the development profile")
......@@ -68,10 +60,10 @@
"destroy will be called when your application
shuts down, put any clean up code here"
(timbre/info "Grill me Senpai! is shutting down...")
(log/info "Grill me Senpai! is shutting down...")
(timbre/info "shutdown complete!"))
(log/info "shutdown complete!"))
(def app-base
(ns gms.middleware
(:require [gms.layout :refer [*servlet-context* render]]
[taoensso.timbre :as timbre]
[environ.core :refer [env]]
[ :as io]
[selmer.middleware :refer [wrap-error-page]]
......@@ -12,7 +11,8 @@
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[ring.middleware.session-timeout :refer [wrap-idle-session-timeout]]
[ring.middleware.session.memory :refer [memory-store]]
[ring.middleware.format :refer [wrap-restful-format]]))
[ring.middleware.format :refer [wrap-restful-format]]
[ :as log]))
(defn wrap-servlet-context [handler]
(fn [request]
......@@ -30,7 +30,7 @@
(handler req)
(catch Throwable t
(timbre/error t)
(log/error t)
{:status 500
:headers {"Content-Type" "text/html"}
:body (render "templates/error.html" {:error-string (str t)})}))))
......@@ -33,7 +33,6 @@
(use-fixtures :each #(do (disconnect-test-db)
(println test-connection)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment