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

Mark liquibase-maven-plugin logging configuration as deprecated #2261

Merged
merged 2 commits into from Jan 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,6 +14,7 @@
import liquibase.resource.FileSystemResourceAccessor;
import liquibase.resource.ResourceAccessor;
import liquibase.util.FileUtil;
import liquibase.util.StringUtil;
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -180,10 +181,13 @@ public abstract class AbstractLiquibaseMojo extends AbstractMojo {
protected boolean verbose;

/**
* Controls the amount of logging detail Liquibase outputs when executing. The values can be
* "DEBUG", "INFO", "WARNING", "SEVERE", or "OFF". The value is not case sensitive.
* Deprecated and ignored configuration property. Logging is managed via the standard maven logging system
* either using the -e, -X or -q flags or the ${maven.home}/conf/logging/simplelogger.properties file.
*
* @parameter property="liquibase.logging" default-value="INFO"
* See https://maven.apache.org/maven-logging.html for more information.
*
* @parameter property="liquibase.logging"
* @deprecated Logging managed by maven
*/
@PropertyElement
protected String logging;
Expand Down Expand Up @@ -335,6 +339,10 @@ protected Writer getOutputWriter(final File outputFile) throws IOException {

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (StringUtil.trimToNull(logging) != null) {
getLog().error("The liquibase-maven-plugin now manages logging via the standard maven logging config, not the 'logging' configuration. Use the -e, -X or -q flags or see https://maven.apache.org/maven-logging.html");
}

try {
Scope.child(Scope.Attr.logService, new MavenLogService(getLog()), () -> {

Expand Down Expand Up @@ -408,7 +416,6 @@ public void execute() throws MojoExecutionException, MojoFailureException {
//
hasProLicense = MavenUtils.checkProLicense(liquibaseProLicenseKey, commandName, getLog());

// LogService.getInstance().setDefaultLoggingLevel(logging);
getLog().info(CommandLineUtils.getBanner());

// Displays the settings for the Mojo depending of verbosity mode.
Expand Down