# How to configure logging

**URL:** <https://forum.liquibase.org/t/how-to-configure-logging/1359>\
**Category:** Liquibase Development\
**Created:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359 "2009-10-16T14:29:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gramark](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@gramark](https://forum.liquibase.org/u/gramark)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/1 "2009-10-16T14:29:00Z")

</div>

Had a look through the 2.0-RC1 code in an attempt to find out how to configure the new logging architecture. In 1.9.4 it was quite easy  
to reconfigure java.util.logging to use log4j instead but now I cant really figure out how this is possible.  
The LogFactory seems to use the ServiceLocator singleton to look up Logger.class so in order to reroute log messages to log4j instead I would have to implement a log4j bridge by using this interface.  
But how can I make sure that the ServiceLocator uses my bridge instead of the default logger? How do I configure the ServiceLocator?

Best regards  
Lars Gr�mark

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/2 "2009-10-16T14:29:00Z")

</div>

I’m planning to improve the plugin docs in the next couple days, including logging plugins.&nbsp;

Basically you need to create a new class that extends liquibase.logging.core.AbstractLogger and overrides the getPriority method to return larger than 1 and the debug(), info() etc. methods.&nbsp; If you make the class in a sub-package of liquibase.ext it will automaticaly be picked up by liquibase and used.&nbsp;

I was in the process of moving the java.util.logging logger to the extension portal ([http://liquibase.org/extensions)](http://liquibase.org/extensions)) but haven’t gotten it up yet.&nbsp; Hopefully this weekend.

Nathan

---

<div class="post-metadata">

**Author:** ![gramark](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@gramark](https://forum.liquibase.org/u/gramark)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/3 "2009-10-16T14:29:00Z")

</div>

Good. Thanks a lot!

/Lars Gr�mark

---

<div class="post-metadata">

**Author:** ![oliver\_libutzki](https://avatars.discourse-cdn.com/v4/letter/o/f17d59/32.png) [@oliver\_libutzki](https://forum.liquibase.org/u/oliver_libutzki)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/4 "2009-10-16T14:29:00Z")

</div>

> _Originally posted by: Nathan_  
> I'm planning to improve the plugin docs in the next couple days, including logging plugins.&nbsp;
> 
> Basically you need to create a new class that extends liquibase.logging.core.AbstractLogger and overrides the getPriority method to return larger than 1 and the debug(), info() etc. methods.&nbsp; If you make the class in a sub-package of liquibase.ext it will automaticaly be picked up by liquibase and used.&nbsp;
> 
> I was in the process of moving the java.util.logging logger to the extension portal ([http://liquibase.org/extensions)](http://liquibase.org/extensions)) but haven’t gotten it up yet.&nbsp; Hopefully this weekend.
> 
> Nathan

Hi Nathan,

is there any more infiormation concerning logging configuration? I didn’t find anything in the extension portal.

Kind regards  
Oliver

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/5 "2009-10-16T14:29:00Z")

</div>

Hadn’t gotten to it yet, sorry.&nbsp; Still planning too soon…

Nathan

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/6 "2009-10-16T14:29:00Z")

</div>

please see [http://liquibase.jira.com/wiki/display/CONTRIB/Liquibase+Log4j+Extension](http://liquibase.jira.com/wiki/display/CONTRIB/Liquibase+Log4j+Extension)  
  
Chris

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [October 16, 2009, 2:29pm UTC](https://forum.liquibase.org/t/how-to-configure-logging/1359/7 "2009-10-16T14:29:00Z")

</div>

[Fixing liquibase logging (in Spring) with SLF4J and Log4J](http://blog.projectnibble.org/2013/12/29/fixing-liquibase-logging-in-spring/)
