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

2.0.0-rc-1 breaks slf4j config via command line #1220

Open
oehme opened this issue Dec 9, 2024 · 3 comments
Open

2.0.0-rc-1 breaks slf4j config via command line #1220

oehme opened this issue Dec 9, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@oehme
Copy link
Contributor

oehme commented Dec 9, 2024

I want to be able to get selective debug logging, e.g. using -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=debug. However, this only works on the first build that the daemon runs. As soon as you run a second build, the slf4j config is reset and the command line argument is ignored. This used to work in 2.0.0-beta-1

@gnodet
Copy link
Contributor

gnodet commented Dec 11, 2024

I think it works when using a new daemon. However, those properties seem to not be reset correctly:

➜  maven git:(master) mvnd --stop && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=debug foo | grep DEBUG | wc -l) && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=info foo | grep DEBUG | wc -l) && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=debug foo | grep DEBUG | wc -l)
     152
       0
       0

So debug works fine on a new daemon, but if the logger has been set in a previous run to info, it cannot be reset to debug...

@gnodet gnodet added this to the 2.0.0-rc-2 milestone Dec 11, 2024
@gnodet
Copy link
Contributor

gnodet commented Dec 11, 2024

Good news is that is seems already fixed when building mvnd 2.0.0-rc-2-SNAPSHOT with Maven 4.0.0-rc-2-SNAPSHOT:

➜  mvnd git:(master) ✗ (mvnd -v | grep "Apache Maven") && mvnd --stop && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=debug foo | grep DEBUG | wc -l) && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=info foo | grep DEBUG | wc -l) && \
    (mvnd -Dorg.slf4j.simpleLogger.log.org.apache.maven.lifecycle=debug foo | grep DEBUG | wc -l)
Apache Maven Daemon (mvnd) 2.0.0-rc-2-SNAPSHOT darwin-aarch64 native client (b0a210d81a7af62543be0cad43f87072d51c4810)
Apache Maven 4.0.0-rc-2-SNAPSHOT (8706dd7edf5cb97932af2819fa1cdc7b343dbe0d)
Stopping 1 running daemons
      48
       0
      45

@cstamas
Copy link
Member

cstamas commented Dec 17, 2024

Yes, this was fixed in rc-2

@slachiewicz slachiewicz added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants