pjlegato / ring.middleware.logger

Ring middleware to log each request
58 stars 24 forks source link

Cannot require on Clojure 1.9.0-alpha16 #22

Closed krisleech closed 7 years ago

krisleech commented 7 years ago
(ns commander.core
  (:gen-class)
  (:require [ring.middleware.logger :refer [wrap-with-logger]]))
Exception in thread "main" clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec:
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-refer-clojure at: [:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-require at: [:args :clauses :require :clause] predicate: #{:require}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-import at: [:args :clauses :import :clause] predicate: #{:import}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-use at: [:args :clauses :use :clause] predicate: #{:use}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-refer at: [:args :clauses :refer :clause] predicate: #{:refer}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-load at: [:args :clauses :load :clause] predicate: #{:load}
In: [3 0] val: import fails spec: :clojure.core.specs.alpha/ns-gen-class at: [:args :clauses :gen-class :clause] predicate: #{:gen-class}
:clojure.spec.alpha/args  (onelog.core "Batteries-included logging for Clojure. You can require this one\nfile and begin logging, with no further configuration necessary.\n\n\nBUG - TODO: Fix so that (set-default-logger!) gets called automatically if\nthe user tries to log without calling it first.\n\nTODO: Add profiling methods (i.e. run a function and log how long it took)\n" (:require [clojure.tools.logging :as log] [clj-logging-config.log4j :as log-config] [clansi.core :as ansi]) (import (org.apache.log4j DailyRollingFileAppender EnhancedPatternLayout FileAppender)))
krisleech commented 7 years ago

Actually I think the issue is with onelog https://github.com/pjlegato/onelog/pull/4

krisleech commented 7 years ago

The workaround is to add [onelog "0.4.6"] to the dependencies.

krisleech commented 7 years ago

fix here: https://github.com/pjlegato/ring.middleware.logger/pull/23

krisleech commented 7 years ago

I see this has been fixed already: https://github.com/pjlegato/ring.middleware.logger/pull/21