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

quarkus.log.min-level doesn't overwrite quarkus.log.level #20066

Closed
pjgg opened this issue Sep 10, 2021 · 2 comments · Fixed by #20373
Closed

quarkus.log.min-level doesn't overwrite quarkus.log.level #20066

pjgg opened this issue Sep 10, 2021 · 2 comments · Fixed by #20373
Assignees
Labels
area/logging kind/bug Something isn't working
Milestone

Comments

@pjgg
Copy link
Contributor

pjgg commented Sep 10, 2021

Describe the bug

According to the Doc:

There are two logging level settings: logging level and minimum logging level. The default logging level is INFO, the default minimum logging level is DEBUG. You can adjust both either globally, using the quarkus.log.level and quarkus.log.min-level property, or by category.

When you set the logging level below the minimum logging level, you must adjust the minimum logging level as well. Otherwise, the value of minimum logging level overrides the logging level.

However, If I set quarkus.log.min-level to FATAL, I am still logging INFO traces.

Expected behavior:
For a given application with the following traces:

        LOG.fatal("Fatal log example");
        LOG.error("Error log example");
        LOG.warn("Warn log example");
        LOG.info("Info log example");
        LOG.debug("Debug log example");
        LOG.trace("Trace log example");

And the configuration:

quarkus.log.min-level=DEBUG
quarkus.log.level=TRACE

I will expect to see the following traces:

Fatal log example
Error log example
Warn log example
Info log example
Debug log example

Because of this Doc ref: When you set the logging level below the minimum logging level, you must adjust the minimum logging level as well. Otherwise, **the value of minimum logging level overrides the logging level.**

But I got these traces:

Fatal log example
Error log example
Warn log example
Info log example
Debug log example
Trace log example

Quarkus Version: upstream

Reproducer: https://github.com/pjgg/quarkus-test-suite/blob/feat/logMinLevel/logging/jboss/src/test/java/io/quarkus/ts/logging/jboss/LogResourceIT.java#L78

Test cmd: mvn clean verify -pl logging/jboss

@galderz
Copy link
Member

galderz commented Sep 23, 2021

This could be a bug in the original feature when handling quarkus.log.level specifically. If you use a category, then this works. E.g.

quarkus.log.category."io.quarkus.ts.logging.jboss".level=TRACE

@galderz
Copy link
Member

galderz commented Sep 24, 2021

PR sent: #20373

@quarkus-bot quarkus-bot bot added this to the 2.4 - main milestone Sep 24, 2021
@geoand geoand modified the milestones: 2.4 - main, 2.3.0.Final Sep 28, 2021
geoand pushed a commit to geoand/quarkus that referenced this issue Sep 28, 2021
@gsmet gsmet modified the milestones: 2.3.0.Final, 2.2.4.Final Nov 30, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 1, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants