Discussion:
[Liquibase-user] New Topic: Setting logging for Liquibase facade
Liquibase Community Forum
2011-01-19 01:24:20 UTC
Permalink
A new topic, 'Setting logging for Liquibase facade', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=954.new#new

The text of the topic is shown below:

I don't know how to set the Liquibase log level to "severe".

I investigated, and I see that the Liquibase facade (liquibase.Liquibase) gets its logger by calling LogFactory.getLogger(). This, in turn, calls LogFactory.getLogger("liquibase").

If you attempt to set the log level of this logger, like this:

final Logger logger = LogFactory.getLogger();
logger.setLogLevel("severe");
final Liquibase liquibase = new Liquibase(...);

...then it appears that the log level is actually set to debug internally--or at least all kinds of debug information is printed to the log.

I dug around in the source code of DefaultLogger and discovered that it first checks a System property named liquibase.defaultlogger.level. So it would seem that another way to do this would be to simply set this System property to, say, severe, and it should be picked up automatically. I observed the same symptoms, however--lots of debug information in the log.

I'm obviously missing something fundamental here: how does one change the log level for all of liquibase when it is run through the facade class?

Thanks,
Laird

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The Liquibase Community Forum Team.

Loading...