From 79d65188b1c1578a36403c0e5756c81dcc93d816 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 14 Apr 2008 21:54:00 -0400 Subject: Remove svn files --- server/.svn/text-base/log.c.svn-base | 99 ------------------------------------ 1 file changed, 99 deletions(-) delete mode 100644 server/.svn/text-base/log.c.svn-base (limited to 'server/.svn/text-base/log.c.svn-base') diff --git a/server/.svn/text-base/log.c.svn-base b/server/.svn/text-base/log.c.svn-base deleted file mode 100644 index 612156d..0000000 --- a/server/.svn/text-base/log.c.svn-base +++ /dev/null @@ -1,99 +0,0 @@ -#include "conf.h" -#include "log.h" - -#include -#include -#include -#include -#include -#include -#include - -RCSID("$Id: log.c,v 1.8 2000/11/13 18:47:17 shmit Exp $"); - -extern char *progname; - -#if 0 -FILE *logf = NULL; -#endif - -static void log_priority(int priority, const char *fmt, va_list args); - -/* - * Log a message with a given priority. - */ -void -log_priority(int priority, const char *fmt, va_list args) -{ - char lbuff[1024]; -#if 0 - char tbuff[256]; - struct tm timeptr; - time_t tloc; -#endif - - (void)snprintf(lbuff, sizeof(lbuff), - "[tid: %d] %s", (int)pthread_self(), fmt); - vsyslog(priority, lbuff, args); - -#if 0 - tloc = time(0); - (void)localtime_r(&tloc, &timeptr); - (void)strftime(tbuff, sizeof(tbuff), "%Y-%h-%d %H:%M:%S", &timeptr); - (void)snprintf(lbuff, sizeof(lbuff), "%s %s[%d:%d] %s\n", - tbuff, progname, getpid(), (int)pthread_self(), fmt); - (void)vfprintf(logf, lbuff, args); -#endif -} - -/* - * Log an error message. - */ -void -log_err(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - log_priority(LOG_ERR, fmt, ap); - va_end(ap); -} - -/* - * Log a warning message. - */ -void -log_warn(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - log_priority(LOG_WARNING, fmt, ap); - va_end(ap); -} - -/* - * Log an informational message. - */ -void -log_info(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - log_priority(LOG_INFO, fmt, ap); - va_end(ap); -} - -/* - * Initialize logging facilites. - */ -void -log_open() -{ - openlog(progname, LOG_PID|LOG_PERROR, LOG_DAEMON); - -#if 0 - logf = fopen("/home/shmit/var/log/nastd.log", "a+"); -#endif -} -- cgit v1.2.3