I'm rather new to Liquibase and I'm basically exploring this great tool (version 3.5.1), but I've just come accross a behaviour that doesn't sound right to me.
Let's consider the following changeSet:
I'm expecting to get the message "There are compilation errors on DB Objects" output to my log file whenever the condition fails. However I want Liquibase to proceed with the current changeSet, so this is why I set the "onFail" attribute to "WARN".
I'm using a properties file to set the "logLevel" and the "logFile" optional parameters:
My problem is the message is not logged when logLevel is set to "warning" whereas it gets logged when I set the logLevel to "info", but then the log is filled with a lot of information I just don't want to see in my log file.
I thought onFail="WARN" and logLevel="warning" was a consistent setting, but maybe I'm mistaken.
Could someone help me understand this behaviour?
Let's consider the following changeSet:
- <changeSet author="paddy" id="tables, views and sequences:public synonyms" runAlways="true" runOnChange="true">
- <preConditions onFail="WARN" onFailMessage="There are compilation errors on DB Objects">
- <sqlCheck expectedResult="1">SELECT COUNT(*) FROM DBA_ERRORS WHERE UPPER(OWNER)=UPPER('${owner}') AND TYPE NOT IN ('PROCEDURE','FUNCTION','PACKAGE','PACKAGE BODY')</sqlCheck>
- </preConditions>
- <comment>Creation of all tables, views and sequences public synonyms</comment>
- <sqlFile path="../../sql/create_db_objects_public_synonyms.sql"
- relativeToChangelogFile="true"
- encoding="UTF-8"
- splitStatements="true"
- endDelimiter="\n/\s*\n|\n/\s*$"/>
- <rollback/>
- </changeSet>
I'm expecting to get the message "There are compilation errors on DB Objects" output to my log file whenever the condition fails. However I want Liquibase to proceed with the current changeSet, so this is why I set the "onFail" attribute to "WARN".
I'm using a properties file to set the "logLevel" and the "logFile" optional parameters:
- logLevel: warning
- logFile: ./lb_logs/liquibase.log
My problem is the message is not logged when logLevel is set to "warning" whereas it gets logged when I set the logLevel to "info", but then the log is filled with a lot of information I just don't want to see in my log file.
I thought onFail="WARN" and logLevel="warning" was a consistent setting, but maybe I'm mistaken.
Could someone help me understand this behaviour?