@seancorfield @abdusalam Thanks!!! I appreciate it! My program only sometimes starts a web server, so having it always log this message was irritating. I burned at least an hour on this.
Is there any handy way to suppress this Jetty output (Logging initialized) ?
$ cat deps.edn
{:deps {
ring/ring-core {:mvn/version "1.8.2"}
ring/ring-jetty-adapter {:mvn/version "1.8.2"}}
}
$ cat src/holy.clj
(ns holy
(:require [ring.adapter.jetty]))
(defn -main [ & args ]
(println "I dont do much")
)
$ clj -M -m holy
2022-01-31 21:27:15.648:INFO::main: Logging initialized @1064ms to org.eclipse.jetty.util.log.StdErrLog
I dont do muchhave you tried this? https://stackoverflow.com/questions/51978990/how-to-suppress-logging-output-to-stdout-when-using-jetty-websocket-client#51979135
@abdusalam’s suggestion looks good @bherrmann:
seanc@Sean-win-11-laptop:~/oss$ clj -Sdeps '{:deps {ring/ring {:mvn/version "RELEASE"}}}'
Clojure 1.10.3
user=> (require 'ring.adapter.jetty)
2022-01-31 19:06:00.540:INFO::main: Logging initialized @3922ms to org.eclipse.jetty.util.log.StdErrLog
nil
user=>
seanc@Sean-win-11-laptop:~/oss$ clj -J-Dorg.eclipse.jetty.util.log.announce=false -Sdeps '{:deps {ring/ring {:mvn/version "RELEASE"}}}'
Clojure 1.10.3
user=> (require 'ring.adapter.jetty)
nil
user=>I tried this, but it seemed to have no effect,
$ cat src/jetty-logging.properties
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
org.eclipse.jetty.LEVEL=WARNI also tried,
$ clj -J-Dorg.eclipse.jetty.http.LEVEL=OFF -M -m holy
2022-01-31 21:49:52.199:INFO::main: Logging initialized @1078ms to org.eclipse.jetty.util.log.StdErrLog
I dont do much