Skip to content

Running lein ring server headless, ignores resources/log4j.properties  #222

@sindhubb

Description

@sindhubb

I have a resources/log4j.properties file which is honoured when I run my app as java -jar... but when I run my app through lein ring as lein ring server-headless 3334, I keep seeing the log level as INFO. How can I get lein ring to honour my log4j.properties file?

$ DEVMODE=1 JAVA_OPTS=-Xmx500m lein ring server-headless 3334
22-08-09 09:52:57 Sindhus-MacBook-Air.local INFO [org.eclipse.jetty.util.log:186] - Logging initialized @1300ms
22-08-09 09:53:00 Sindhus-MacBook-Air.local INFO [com.mchange.v2.log.MLog:203] - MLog clients using slf4j logging.
22-08-09 09:53:00 Sindhus-MacBook-Air.local INFO [com.mchange.v2.c3p0.C3P0Registry:203] - Initializing c3p0-0.9.5-pre9 [built 08-October-2014 03:06:08 -0700; debug? true; trace: 10]
WARNING: uri? already refers to: #'clojure.core/uri? in namespace: schema-contrib.core, being replaced by: #'schema-contrib.core/uri?
"***** Initializing Database settings ***** "
"***** Hello Dev! ***** "
22-08-09 09:53:02 Sindhus-MacBook-Air.local INFO [org.eclipse.jetty.server.Server:327] - jetty-9.2.21.v20170120
22-08-09 09:53:02 Sindhus-MacBook-Air.local INFO [org.eclipse.jetty.server.ServerConnector:266] - Started ServerConnector@f3e6e05{HTTP/1.1}{0.0.0.0:3334}
22-08-09 09:53:02 Sindhus-MacBook-Air.local INFO [org.eclipse.jetty.server.Server:379] - Started @6342ms
Started server on port 3334

resources/log4j.properties

log4j.logger.com.mchange.v2=FINE
log4j.category.org.eclipse.jetty=DEBUG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions