leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
Empperi 2019-03-25T12:03:18.099300Z

Hmm. I wonder if there is a way to execute (System/setProperty "foo" "bar") as part of a leiningen build right from project.clj

Empperi 2019-03-25T12:05:13.099800Z

And naturally this should affect the actual application JVM instance, not the leiningen one

Empperi 2019-03-25T12:06:41.101100Z

Use case: I need to set the Timbre logging level before any application code executes. When using Figwheel Main with Timbre and it's slf4j adapter, it sets the logging level to DEBUG and this causes Jetty (used by Figwheel Main) to log it's stuff at that level. And that causes a TON of unnecessary crap to fill my logs

Empperi 2019-03-25T12:07:47.101800Z

Also, since in this case it's Figwheel Main being called I do not have a proper place where I could inject that system property value before Figwheel starts it's magic

dpsutton 2019-03-25T12:16:57.102200Z

just as a temporary work around, have you seen that you can change the figwheel logging level?

Empperi 2019-03-25T12:17:06.102600Z

Yeah

Empperi 2019-03-25T12:17:10.102900Z

Unfortunately doesn't affect this

dpsutton 2019-03-25T12:17:27.103400Z

ah bummer. was hoping for an easy fix for you 🙂

Empperi 2019-03-25T12:17:40.103800Z

The problem here is that Figwheel Main logging level is a jucl -level config

Empperi 2019-03-25T12:17:56.104200Z

It's actually quite strange, Figwheel Main uses jucl, but Jetty uses slf4j

Empperi 2019-03-25T12:18:19.104600Z

So, if one changes jucl level logging level it really doesn't help at all

dpsutton 2019-03-25T12:18:40.104900Z

i'm not following the term jucl

Empperi 2019-03-25T12:19:18.105300Z

sorry, wrong abbreviation. The Java Commons Logging or whatever. The one which comes with Java

dpsutton 2019-03-25T12:19:25.105600Z

ah ok.

Empperi 2019-03-25T12:19:26.105700Z

Which NO ONE uses

Empperi 2019-03-25T12:19:27.105900Z

😄

Empperi 2019-03-25T12:19:55.106400Z

I can see why it was chosen, no extra dependencies

dpsutton 2019-03-25T12:19:59.106700Z

ah. java.util.logging

Empperi 2019-03-25T12:20:02.106900Z

indeed

Empperi 2019-03-25T12:20:26.107300Z

But if one grabs pretty much any java lib you'll get either log4j or slf4j

Empperi 2019-03-25T12:20:50.107600Z

All of these sucks monkeyballs, I like Timbre

Empperi 2019-03-25T12:20:58.107900Z

But in this specific case I'm pulling my hair out with this combo

Empperi 2019-03-25T12:21:23.108300Z

I could set an environment variable to control Timbre before I even start Leiningen

Empperi 2019-03-25T12:21:38.108700Z

But that unfortunately is not a very good solution since that doesn't work as part of the build

Empperi 2019-03-25T12:22:35.109600Z

One can also control Timbre via system properties but that too isn't that easy to control with Leiningen which uses a separate process model for builds

Empperi 2019-03-25T12:23:26.110400Z

It's frustrating that I've spent 5 hours now in a futile attempt to silence Jetty logging when making a figwheel build with leiningen

Empperi 2019-03-25T13:35:27.110700Z

Decided this is a Figwheel Main issue and created one https://github.com/bhauman/figwheel-main/issues/162