java

Schmoho 2024-08-19T11:41:50.370609Z

What is the correct way to set log levels programmatically (i.e. from input params) without becoming dependent on an implementation? I am now using slf4j api in my java library but the same codebase serves as a CLI utility which needs to be able to set log levels ...

Rupert (Sevva/All Street) 2024-08-22T08:09:48.495359Z

If you use dependency injection (e.g. Spring) then you can inject and configure any logger without hard coupling to it.

emccue 2024-08-20T03:15:03.224429Z

I think thats always implementation dependent

emccue 2024-08-20T03:15:42.795689Z

the cli frontend part should be a seperately distributed lib which pulls in a logging impl