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?
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.
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.