vlog: Make vlog initialize itself when necessary.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Jul 2010 18:23:31 +0000 (11:23 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 21 Jul 2010 22:47:09 +0000 (15:47 -0700)
commit1e8cf0f721e3e21579790c65269a81d39f808528
tree4df59e6e0bcf0f671d6f793572d4b18580132ea3
parentff8bb7e76b2cdcbcf88cd2fac663ba517e4a659c
vlog: Make vlog initialize itself when necessary.

It's more convenient if clients don't have to initialize modules
explicitly.

The most important part of this change is to initialize the default
log levels statically.  Previously, by initializing log levels only
from vlog_init(), all the log levels appeared to be VLL_EMER (0) if
vlog_init() was accidentally not called at all.  This was not intended
behavior, so this commit fixes it.

This commit also fixes up a few test programs whose tests accidentally
depended on this behavior, by making them explicitly turn off log
messages that were implicitly turned off before.
lib/vlog.c
tests/test-lockfile.c
tests/test-reconnect.c