diff options
| author | Michael Brown | 2012-03-26 20:50:50 +0200 |
|---|---|---|
| committer | Michael Brown | 2012-03-26 20:58:14 +0200 |
| commit | 24b7296319666709ac49bedb47df18d0bc37704e (patch) | |
| tree | d2c5847e0d8844ea50b7a835fe7d21fd5f556a4d /src/include/ipxe/syslog.h | |
| parent | [console] Exclude text-based UI output from logfile-based consoles (diff) | |
| download | ipxe-24b7296319666709ac49bedb47df18d0bc37704e.tar.gz ipxe-24b7296319666709ac49bedb47df18d0bc37704e.tar.xz ipxe-24b7296319666709ac49bedb47df18d0bc37704e.zip | |
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/syslog.h')
| -rw-r--r-- | src/include/ipxe/syslog.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/ipxe/syslog.h b/src/include/ipxe/syslog.h index 25edc6b0c..256ac7613 100644 --- a/src/include/ipxe/syslog.h +++ b/src/include/ipxe/syslog.h @@ -9,6 +9,8 @@ FILE_LICENCE ( GPL2_OR_LATER ); +#include <syslog.h> + /** Syslog server port */ #define SYSLOG_PORT 514 @@ -28,7 +30,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); * * This is a policy decision */ -#define SYSLOG_SEVERITY 6 /* informational */ +#define SYSLOG_SEVERITY LOG_INFO /** Syslog priority */ #define SYSLOG_PRIORITY( facility, severity ) ( 8 * (facility) + (severity) ) |
