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

The core.Logger#setLevel method should work like #2282

Merged
merged 2 commits into from Feb 14, 2024

Conversation

garydgregory
Copy link
Member

The core.Logger#setLevel method should work like Configurator#setLevel #2281

@ppkarwasz

I'm not sure how to really test this from our 1.2 module but I did install a snapshot locally and tested it with my Apache Commons Logging branch here https://github.com/garydgregory/commons-logging/tree/log4j1-log42-api

The POM change to apache-rat-plugin was required for mvn clean verify to pass locally.

Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply test that setting a new level on a "foo" logger changes the effective level on a "foo.bar" logger?

@@ -542,6 +542,7 @@
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.16.1</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should bump this in logging-parent if necessary or even better in the ASF parent: apache/maven-apache-parent#193

@ppkarwasz
Copy link
Contributor

BTW: you should also add a file in src/changelog/.2.x.x.

Copy link
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test too, please?

@vy vy added bug Incorrect, unexpected, or unintended behavior of existing code api Affects the public API labels Feb 13, 2024
@garydgregory
Copy link
Member Author

garydgregory commented Feb 13, 2024

I added tests but they fail. I can't tell if the issue is in main or the test itself... See LoggerTest's new testSetLevel() and testSetPriority()

@garydgregory
Copy link
Member Author

TY @ppkarwasz !

@garydgregory garydgregory merged commit 0ecf6e1 into apache:2.x Feb 14, 2024
9 checks passed
@garydgregory garydgregory deleted the 2.x-issue-2281 branch February 14, 2024 12:30
@ppkarwasz ppkarwasz added this to the 2.23.0 milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the public API bug Incorrect, unexpected, or unintended behavior of existing code legacy-1.2-bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants