version 1.29.8.1, 2006/10/06 03:19:32 |
version 1.30, 2006/03/19 18:51:18 |
|
|
/* $OpenBSD$ */ |
|
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
#include <sys/types.h> |
#include "includes.h" |
|
|
#include <stdarg.h> |
#include "log.h" |
#include <stdio.h> |
#include "xmalloc.h" |
#include <stdlib.h> |
|
#include <string.h> |
|
#include <syslog.h> |
#include <syslog.h> |
#include <unistd.h> |
|
#include <vis.h> |
#include <vis.h> |
|
|
#include "xmalloc.h" |
|
#include "log.h" |
|
|
|
static LogLevel log_level = SYSLOG_LEVEL_INFO; |
static LogLevel log_level = SYSLOG_LEVEL_INFO; |
static int log_on_stderr = 1; |
static int log_on_stderr = 1; |
static int log_facility = LOG_AUTH; |
static int log_facility = LOG_AUTH; |
|
|
do_log(SYSLOG_LEVEL_ERROR, fmt, args); |
do_log(SYSLOG_LEVEL_ERROR, fmt, args); |
va_end(args); |
va_end(args); |
} |
} |
|
|
void |
|
sigdie(const char *fmt,...) |
|
{ |
|
va_list args; |
|
|
|
va_start(args, fmt); |
|
do_log(SYSLOG_LEVEL_FATAL, fmt, args); |
|
va_end(args); |
|
_exit(1); |
|
} |
|
|
|
|
|
/* Log this message (information that usually should go to the log). */ |
/* Log this message (information that usually should go to the log). */ |
|
|