Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sindhubb opened this issue Aug 9, 2022 · 1 comment
Open

Comments

@sindhubb
Copy link

sindhubb commented Aug 9, 2022

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
@weavejester
Copy link
Owner

Potentially this is an issue stemming from the use of Leiningen's eval-in-project. I'm unsure how to work around this, but I welcome any investigation or patches people want to contribute toward solving this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants