This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-28
Channels
- # beginners (226)
- # boot (18)
- # bristol-clojurians (4)
- # cider (1)
- # clara (77)
- # cljs-dev (79)
- # cljsjs (27)
- # clojure (178)
- # clojure-austin (9)
- # clojure-dev (30)
- # clojure-gamedev (11)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-poland (1)
- # clojure-spec (42)
- # clojure-uk (34)
- # clojurescript (182)
- # core-async (5)
- # core-logic (2)
- # cursive (17)
- # datascript (12)
- # datomic (33)
- # emacs (8)
- # figwheel (1)
- # fulcro (25)
- # jobs (6)
- # jobs-discuss (27)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (17)
- # onyx (5)
- # pedestal (7)
- # re-frame (30)
- # reagent (52)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (40)
- # spacemacs (5)
- # sql (31)
- # unrepl (12)
- # vim (25)
any idea how to override logback in tests?
If logback finds a logback-test.xml
on the classpath, it uses that instead of logback.xml
. So put a copy in dev-resources
.
I start with this:
<configuration scan="true" scanPeriod="1 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<root level="warn">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
ok I found it
{:profiles {:test {:jvm-opts ["-Dlogback.configurationFile=test-logback.xml"]}} just switched to different config
@souenzzo yes, see the print out of the context in the following example:
dev> (require '[io.pedestal.interceptor.chain :as chain])
nil
dev> (def a {:name :a :enter (fn [ctx] (clojure.pprint/pprint ctx) ctx)})
#'dev/a
dev> (def b {:name :b :enter identity})
#'dev/b
dev> (chain/execute (chain/enqueue {} [b a]))
#:io.pedestal.interceptor.chain{:queue <-()-<,
:execution-id 114,
:stack
({:name :a,
:enter #function[dev/fn--47949]}
{:name :b,
:enter
#function[clojure.core/identity]})}
{}
dev> (chain/execute (chain/enqueue {} [a b]))
#:io.pedestal.interceptor.chain{:queue
<-({:name :b,
:enter
#function[clojure.core/identity]})-<,
:execution-id 115,
:stack
({:name :a,
:enter #function[dev/fn--47949]})}
{}
dev>