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

Revise log levels #1038

Closed
odrotbohm opened this issue Jan 5, 2023 · 2 comments · Fixed by #1050
Closed

Revise log levels #1038

odrotbohm opened this issue Jan 5, 2023 · 2 comments · Fixed by #1050

Comments

@odrotbohm
Copy link
Contributor

Importing class files currently writes a lot of DEBUG output to the console, as most loggers default to DEBUG log level. Especially in Spring Boot applications, that usually configure their integration test log levels via application.properties adding a configuration file dedicated to the logging library causes the Boot log configuration to back off, as that now expects all logging to be configured in that file. Ideally, I'd like to see ArchUnit to not produce any output, except logging explicitly configured to.

It would be nice if the following steps were taken:

  • Lower the log levels in PluginLoader for the Java version detection to TRACE.
  • Lower the log levels in UrlSource, ArchConfiguration and JavaClassProcessor to TRACE.
@codecholeric
Copy link
Collaborator

Yes, I got you 😂 Should probably have done this a long time ago just to avoid the discussion 🤷‍♂️ I just always had the feeling that "taking archunit.properties from path x" is a different quality than "importing method foo". And setting everything to TRACE will effectively not allow to distinguish by level anymore. But I guess it's always possible to just to a category based configuration 🤷‍♂️ I'm gonna adjust it...

codecholeric added a commit that referenced this issue Feb 2, 2023
Over the years there have been continuous issues by people not
configuring their logging system appropriately and then being spammed by
masses of DEBUG logs. In particular, because ArchUnit hooks into SLF4J
and as it seems e.g. Spring Boot sets the log-level to DEBUG if the
configuration is missing. While I principally think people should just
correctly configure their logging infrastructure I've also been worn
down over time ;-) So, I will reduce all non-WARN levels to TRACE now
and accept that it will not be possible anymore to distinguish extremely
spammy output (like "found access from x to y") from more central output
(like "dependency resolution configuration") by log-level.

Resolves: #1038
Resolves: #1049
@odrotbohm
Copy link
Contributor Author

Thanks! 🫶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants