summaryrefslogtreecommitdiffstats
path: root/lib/log.h
diff options
context:
space:
mode:
authorajs <ajs>2004-11-29 00:00:01 +0100
committerajs <ajs>2004-11-29 00:00:01 +0100
commit7d149b8e48ef72021aefddf44f400bccaf391870 (patch)
tree67a7aeda5a2d98aabcafabe9e936a5711076ad41 /lib/log.h
parentDEFUN_DEPRECATED passes attribute to DEFUN as well. (diff)
downloadfrr-7d149b8e48ef72021aefddf44f400bccaf391870.tar.xz
frr-7d149b8e48ef72021aefddf44f400bccaf391870.zip
2004-11-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* log.h: Remove several unused fields from struct zlog. Add comments for other fields, and add one new field syslog_options that is used in the new syslog_sigsafe implementation. * log.c: (syslog_sigsafe) New function to send syslog messages in an async-signal safe way that can be used inside a signal handler. (syslog_connect) New function to connect to syslog daemon inside a signal handler. This function supports only systems where /dev/log is a unix datagram socket (e.g. not Solaris). (zlog_signal) Call syslog_sigsafe if syslog logging is enabled. (zlog_backtrace_sigsafe) Call syslog_sigsafe if syslog logging is enabled. (openzlog) Save syslog_options for use in syslog_sigsafe. (num_append) Fix bug: handle 0 properly. (hex_append) New function to print a u_long in hex format.
Diffstat (limited to 'lib/log.h')
-rw-r--r--lib/log.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/log.h b/lib/log.h
index 17b24cd7a..54cc2a6cf 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -46,18 +46,16 @@ typedef enum
struct zlog
{
- const char *ident;
+ const char *ident; /* daemon name (first arg to openlog) */
zlog_proto_t protocol;
- int flags;
+ int flags; /* mask indicating which destinations to log to */
FILE *fp;
char *filename;
- int syslog;
- int stat;
- int connected;
- int maskpri; /* as per syslog setlogmask */
- int priority; /* as per syslog priority */
+ int maskpri; /* discard messages with priority > maskpri */
int facility; /* as per syslog facility */
- int record_priority;
+ int record_priority; /* should messages logged through stdio include the
+ priority of the message? */
+ int syslog_options; /* 2nd arg to openlog */
};
/* Message structure. */