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
maven-plugin: Support increasing maven log level #4148
Conversation
Initial/Pre-Review Thoughts I'm a bit torn on what I think on this PR, and don't have an off-hand answer so I'll move it along the process for more discussion. Like you said, Maven has their built-in functionality for managing the logs and my base theory is that Liquibase should be simply plugging into the existing logging system and not trying to fight it or change it. That if we try to go our own way with the logging, it ends up with strange edge cases due to conflicts in configurations. At the same time, I get that the maven logging config has limitations on how it can be configured and how well it's documented. I also wonder if the root problem of So I'll open it up to the larger group:
|
This would partially solve my problem: First of all, here would be my wishlist for logs that should just be debug logs for all scenarios:
Additionally, the log level of Essentially, my goal is for our maven test DB workflow that liquibase only loggs a fixed number of lines, regardless of how big the classpath is and how many changesets are executed. However, changing the changeset log level for other use-cases (incremental DB updates) would certainly be a mistake. |
@StevenMassaro from MDC point of view, is this change ok? |
liquibase-maven-plugin/src/main/java/org/liquibase/maven/plugins/MavenLog.java
Show resolved
Hide resolved
I don't think this should have an impact. However, if someone were to decrease the log level, like to SEVERE, they may miss out on some MDC logging that they ordinarily would get with INFO/DEBUG/etc. However, that's intended functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After all the reviews here this PR seems good to be moved along.
This pull request introduces a new property to the liquibase-maven-plugin, enabling the ability to change the log level using the 'logLevel' property.
APPROVED |
Impact
Description
This PR adds a new property to the maven plugin, which allows increasing the log level with a new
logLevel
property.Our primary use case / problem is that liquibase has a lot of INFO level logs. For instance, the
Loading artifacts into URLClassLoader
section is already bigger than the rest of the non-liquibase maven output for some of our projects. To solve this we want to only increase the log level of the liquibase plugin (so nomvn --quiet
). Sadly, maven does not support changing the log level for a specific plugin inside thepom.xml
. Thus, this PR is required.Things to be aware of
Things to worry about
None
Additional Context
I am aware that there already exists the maven SLF4J logging configuration. However this does not fit our need since this is a maven installation and not project configuration.