Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

SRC/syslog.c File Reference


Detailed Description

Simple syslog handler for Watt-32.

Loosely based on BSD-version. by Gisle Vanem <giva@bgnett.no> Jun-99

This module really belongs to the application layer, but is included in Watt-32 for convenience.

Note:
syslog_init() must be called in watt_sock_init() (or prior to that). openlog() and syslog() cannot be used before watt_sock_init() is called.

Todo:
configure variables in syslog2.c when calling openlog() thus making syslog() independent of watt_sock_init().

Definition in file syslog.c.

Go to the source code of this file.

Functions

void MS_CDECL syslog (int pri, const char *fmt,...)
void vsyslog (int pri, const char *fmt, va_list ap)
const char * getlogname (void)
int openloghost (char **errbuf)
void openlog (const char *ident, int logstat, int logfac)
int setlogmask (int new_mask)
char * setlogtag (char *new_tag)
void closelog (void)
int main (void)

Variables

sock_typelog_sock = NULL
FILE * log_file = NULL
DWORD log_host = 0UL
BOOL log_opened = FALSE
int log_stat = 0
char * log_tag = NULL
int log_mask = LOG_INFO
DWORD log_facil = LOG_USER
CODE prioritynames []
CODE facilitynames []


Variable Documentation

CODE facilitynames[]
 

Initial value:

{ { LOG_AUTH, "auth" }, { LOG_AUTHPRIV, "authpriv" }, { LOG_CRON, "cron" }, { LOG_DAEMON, "daemon" }, { LOG_FTP, "ftp" }, { LOG_KERN, "kern" }, { LOG_LPR, "lpr" }, { LOG_MAIL, "mail" }, { INTERNAL_MARK, "mark" }, { LOG_NEWS, "news" }, { LOG_NTP, "ntp" }, { LOG_AUTH, "security" }, { LOG_SYSLOG, "syslog" }, { LOG_USER, "user" }, { LOG_UUCP, "uucp" }, { LOG_LOCAL0, "local0" }, { LOG_LOCAL1, "local1" }, { LOG_LOCAL2, "local2" }, { LOG_LOCAL3, "local3" }, { LOG_LOCAL4, "local4" }, { LOG_LOCAL5, "local5" }, { LOG_LOCAL6, "local6" }, { LOG_LOCAL7, "local7" }, { -1, NULL } }
Definition at line 83 of file syslog.c.

CODE prioritynames[]
 

Initial value:

{ { LOG_ALERT, "alert" }, { LOG_CRIT, "crit" }, { LOG_DEBUG, "debug" }, { LOG_EMERG, "emerg" }, { LOG_ERR, "err" }, { LOG_ERR, "error" }, { LOG_INFO, "info" }, { INTERNAL_NOPRI, "none" }, { LOG_NOTICE, "notice" }, { LOG_EMERG, "panic" }, { LOG_WARNING, "warn" }, { LOG_WARNING, "warning" }, { -1, NULL } }
Definition at line 67 of file syslog.c.


Generated on Wed Aug 4 08:55:58 2010 for Watt-32 tcp/ip by doxygen 1.3.8