How to configure logging

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

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

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.  If you make the class in a sub-package of liquibase.ext it will automaticaly be picked up by liquibase and used. 

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

Nathan

Good. Thanks a lot!

/Lars Gr�mark

Originally posted by: Nathan
I'm planning to improve the plugin docs in the next couple days, including logging plugins. 

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.  If you make the class in a sub-package of liquibase.ext it will automaticaly be picked up by liquibase and used. 

I was in the process of moving the java.util.logging logger to the extension portal (http://liquibase.org/extensions) but haven’t gotten it up yet.  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

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

Nathan

please see http://liquibase.jira.com/wiki/display/CONTRIB/Liquibase+Log4j+Extension

Chris

Fixing liquibase logging (in Spring) with SLF4J and Log4J