X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Flogging.c;h=26f8ddddc9cbbd638176f70f81d66766a4ab94a9;hb=fa8faff84bbbeb818adaea80d7bf9e12e0074978;hp=867dd3e8c8d78534b434c2744723921957072b3c;hpb=738389581b1ba29a181f639f3d20e3e24ff546f5;p=tinc diff --git a/src/logging.c b/src/logging.c index 867dd3e8..26f8dddd 100644 --- a/src/logging.c +++ b/src/logging.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: logging.c,v 1.3 2002/04/13 10:43:10 zarq Exp $ + $Id: logging.c,v 1.5 2002/04/13 18:01:58 zarq Exp $ */ #include "config.h" @@ -74,7 +74,10 @@ void log_del_hook(log_function_t *fn) void log_default(int level, int priority, char *fmt, va_list ap) { if(debug_lvl >= level) - vfprintf(stderr, fmt, ap); + { + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + } } void log_syslog(int level, int priority, char *fmt, va_list ap) @@ -85,10 +88,10 @@ void log_syslog(int level, int priority, char *fmt, va_list ap) vsyslog(priorities[priority], fmt, ap); } -void syslog(int priority, char *fmt, ...) +void tinc_syslog(int priority, char *fmt, ...) { /* Mapping syslog prio -> tinc prio */ - const int priorities[] = { TLOG_CRIT, TLOG_CRIT, TLOG_CRIT, TLOG_ERR, + const int priorities[] = { TLOG_CRITICAL, TLOG_CRITICAL, TLOG_CRITICAL, TLOG_ERROR, TLOG_NOTICE, TLOG_NOTICE, TLOG_INFO, TLOG_DEBUG }; avl_node_t *avlnode; va_list args;