diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-03-26 20:23:30 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-03-26 21:58:58 +0100 |
commit | 3ff7927d2fd15dd0a524f27d714dff667511718a (patch) | |
tree | 2fd8f8fc92d35946afcc0aeb13c392a49c4efd64 /src/include/ipxe | |
parent | c2875ae32952690e11fc6f654fa48f4f2c9f0567 (diff) | |
download | ipxe-3ff7927d2fd15dd0a524f27d714dff667511718a.zip ipxe-3ff7927d2fd15dd0a524f27d714dff667511718a.tar.gz ipxe-3ff7927d2fd15dd0a524f27d714dff667511718a.tar.bz2 |
[syslog] Pass internal syslog() priority through to syslog console
Use a private ANSI escape sequence to convey the priority of an
internal syslog() message through to the syslog server.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r-- | src/include/ipxe/ansiesc.h | 7 | ||||
-rw-r--r-- | src/include/ipxe/syslog.h | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/include/ipxe/ansiesc.h b/src/include/ipxe/ansiesc.h index 35438e4..c00af25 100644 --- a/src/include/ipxe/ansiesc.h +++ b/src/include/ipxe/ansiesc.h @@ -113,6 +113,13 @@ struct ansiesc_context { /** Select graphic rendition */ #define ANSIESC_SGR 'm' +/** Explicit log message priority + * + * This is an iPXE private sequence identifier. (The range 'p' to '~' + * is reserved for private sequences.) + */ +#define ANSIESC_LOG_PRIORITY 'p' + /** @} */ extern int ansiesc_process ( struct ansiesc_context *ctx, int c ); diff --git a/src/include/ipxe/syslog.h b/src/include/ipxe/syslog.h index 256ac76..035ca67 100644 --- a/src/include/ipxe/syslog.h +++ b/src/include/ipxe/syslog.h @@ -20,17 +20,17 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ #define SYSLOG_BUFSIZE 128 -/** Syslog facility +/** Syslog default facility * * This is a policy decision */ -#define SYSLOG_FACILITY 0 /* kernel */ +#define SYSLOG_DEFAULT_FACILITY 0 /* kernel */ -/** Syslog severity +/** Syslog default severity * * This is a policy decision */ -#define SYSLOG_SEVERITY LOG_INFO +#define SYSLOG_DEFAULT_SEVERITY LOG_INFO /** Syslog priority */ #define SYSLOG_PRIORITY( facility, severity ) ( 8 * (facility) + (severity) ) |