Liquibase 2.0.3 logging with log4j with CustomTaskChange Java code


We recently upgraded to 2.0.3 from 1.9.5

After looking at these old posts


I did the following:

  1. Downloaded from here 
  2. Included it into my code under liquibase.ext.logging
  3. Setup appenders in

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 );

  8.      */
  9.     @Override
  10.     public void execute( final Database database )
  11.         throws CustomChangeException, UnsupportedChangeException
  12.     {
  13. "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.