summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'log.c')
-rw-r--r--log.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/log.c b/log.c
index ad5a10b47..d69154a67 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.c,v 1.42 2011/06/17 21:44:30 djm Exp $ */ 1/* $OpenBSD: log.c,v 1.43 2012/09/06 04:37:39 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,7 +45,7 @@
45#include <syslog.h> 45#include <syslog.h>
46#include <unistd.h> 46#include <unistd.h>
47#include <errno.h> 47#include <errno.h>
48#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) 48#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
49# include <vis.h> 49# include <vis.h>
50#endif 50#endif
51 51
@@ -329,6 +329,21 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
329#endif 329#endif
330} 330}
331 331
332void
333log_change_level(LogLevel new_log_level)
334{
335 /* no-op if log_init has not been called */
336 if (argv0 == NULL)
337 return;
338 log_init(argv0, new_log_level, log_facility, log_on_stderr);
339}
340
341int
342log_is_on_stderr(void)
343{
344 return log_on_stderr;
345}
346
332#define MSGBUFSIZ 1024 347#define MSGBUFSIZ 1024
333 348
334void 349void