From 24b7296319666709ac49bedb47df18d0bc37704e Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 26 Mar 2012 19:50:50 +0100 Subject: [console] Add "log message" console usage and an internal syslog() call Provide an internal syslog() function (unrelated to the syslog console) which can be used to create log messages with specified priorities. The build-time constant LOG_LEVEL can be used to select the minimum required priority for log messages. Any messages that do not have a sufficient priority will be ignored (and will be optimised away at compile-time). The default LOG_LEVEL is LOG_NONE. Signed-off-by: Michael Brown --- src/include/ipxe/console.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/include/ipxe/console.h') diff --git a/src/include/ipxe/console.h b/src/include/ipxe/console.h index 5ff93884..e2bf4be9 100644 --- a/src/include/ipxe/console.h +++ b/src/include/ipxe/console.h @@ -120,9 +120,12 @@ struct console_driver { /** Text-based user interface */ #define CONSOLE_USAGE_TUI 0x0004 +/** Log messages */ +#define CONSOLE_USAGE_LOG 0x0008 + /** All console usages */ -#define CONSOLE_USAGE_ALL \ - ( CONSOLE_USAGE_STDOUT | CONSOLE_USAGE_DEBUG | CONSOLE_USAGE_TUI ) +#define CONSOLE_USAGE_ALL ( CONSOLE_USAGE_STDOUT | CONSOLE_USAGE_DEBUG | \ + CONSOLE_USAGE_TUI | CONSOLE_USAGE_LOG ) /** @} */ -- cgit v1.2.3-55-g7522