]> git.ozlabs.org Git - petitboot/commit
log: Allow runtime selection of 'debug' log level
authorJeremy Kerr <jk@ozlabs.org>
Fri, 4 Apr 2014 05:05:18 +0000 (13:05 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 7 Apr 2014 03:49:08 +0000 (11:49 +0800)
commitae3c354e844698bdb4ed35a6845aa9dca1e9205f
treeb741aa698f1b48d4bf3a42ac696cb1a6d6920465
parent3fa256bb478f2b3e6316c561169190457b21e616
log: Allow runtime selection of 'debug' log level

Currently, we need to compile with -DDEBUG to implement debug-level
logging in the UIs and discover server.

Since we may not be able to easily replace a system's petitboot
binaries, this change introduces a -v|--verbose option to the discver
server and ncurses UI, which enables debug at runtime. We also move some
of the udev debug code out of an #ifdef DEBUG block.

Since petitboot is generally started on boot, we also add a little
infrastructure to pass -v to petitboot on certain system contitions:
either petitboot.debug on the kernel command line, or a petitboot,debug?
NVRAM property containing the value 'true'.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/pb-discover.c
discover/udev.c
lib/log/log.c
lib/log/log.h
ui/ncurses/generic-main.c
utils/pb-console
utils/pb-sysinfo