Liquibase 2.0.3 logging with log4j with CustomTaskChange Java code

Hello 


We recently upgraded to 2.0.3 from 1.9.5


After looking at these old posts

http://forum.liquibase.org/topic/how-to-forward-liquibase-logging-to-log4j-or-slf4j-or-any-other-standard-logging-facility

and

http://forum.liquibase.org/topic/liquibase-log4j-integration


I did the following:


  1. Downloaded from here LiquibaseLog4jLogger.java https://liquibase.jira.com/wiki/display/CONTRIB/Liquibase+Logging+Extensions 
  2. Included it into my code under liquibase.ext.logging
  3. Setup appenders in log4.properties

While Liquibase logging is showing up correctly, logging that comes from our custom Java code that implements the CustomTaskChange interface of Liquibase is not showing al all. 


Here is a minimal example of our custom code.





  1. import org.apache.log4j.Logger;

  2. public class SomeCustomCode
  3.     implements CustomTaskChange
  4. {
  5.     /** Logger for this class */
  6.     static final Logger LOGGER = Logger.getLogger( SomeCustomCode.class );

  7.     
  8.      */
  9.     @Override
  10.     public void execute( final Database database )
  11.         throws CustomChangeException, UnsupportedChangeException
  12.     {
  13.         LOGGER.info( "Started DB migration creation" );
  14.     }
  15. }


What are we missing? How can we see the “Started DB migration creation” message in the logs?


Thank you

Disregard the comment at line 10.

Problem solved.


There was some remaining code from Liquibase 1.9.5 (the After removing it, everything now works as expected.