Search in sources :

Example 1 with CommandLineParsingException

use of liquibase.exception.CommandLineParsingException in project xipki by xipki.

the class LiquibaseMain method changeLogLevel.

public void changeLogLevel(String logLevel, String logFile) throws CommandLineParsingException {
    ParamUtil.requireNonNull("logLevel", logLevel);
    try {
        LogFactory.setInstance(new MyLoggerFactory());
        Logger log = LogFactory.getInstance().getLog();
        if (logFile != null && logFile.length() > 0) {
            log.setLogLevel(logLevel, logFile);
        } else {
            log.setLogLevel(logLevel);
        }
    } catch (IllegalArgumentException ex) {
        throw new CommandLineParsingException(ex.getMessage(), ex);
    }
}
Also used : CommandLineParsingException(liquibase.exception.CommandLineParsingException) MyLoggerFactory(org.xipki.dbtool.internal.MyLoggerFactory) Logger(liquibase.logging.Logger)

Aggregations

CommandLineParsingException (liquibase.exception.CommandLineParsingException)1 Logger (liquibase.logging.Logger)1 MyLoggerFactory (org.xipki.dbtool.internal.MyLoggerFactory)1