1 /* 2 ** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the OpenBeOS License. 4 */ 5 #ifndef SYSLOG_DAEMON_H 6 #define SYSLOG_DAEMON_H 7 8 9 #include <OS.h> 10 11 12 #define SYSLOG_PORT_NAME "syslog_daemon" 13 14 #define SYSLOG_MESSAGE '_Syl' 15 #define SYSLOG_ADD_LISTENER 'aSyl' 16 #define SYSLOG_REMOVE_LISTENER 'rSyl' 17 18 19 // This message is sent from both, the POSIX syslog API and the kernel's 20 // dprintf() logging facility if logging to syslog was enabled. 21 22 struct syslog_message { 23 thread_id from; 24 time_t when; 25 int32 options; 26 int16 priority; 27 char ident[B_OS_NAME_LENGTH]; 28 char message[1]; 29 }; 30 31 #define SYSLOG_PRIORITY(options) ((options) & 0x7) 32 #define SYSLOG_FACILITY(options) ((options) & 0x03f8) 33 34 #endif /* SYSLOG_DAEMON_H */ 35