From a96e69a098a0ec8ac2e5ca67adf8fc2688a821f5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Mon, 9 Jan 2012 08:21:27 +0000 Subject: [PATCH] added print err fct --- src/lib/log.c | 9 +++++++++ src/lib/log.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/lib/log.c b/src/lib/log.c index 447a4cf..0ee1cc3 100644 --- a/src/lib/log.c +++ b/src/lib/log.c @@ -117,3 +117,12 @@ void log_debug(const char *fmt, ...) vlogf(LOG_DEBUG, fmt, ap); va_end(ap); } + +void log_err(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vlogf(LOG_ERR, fmt, ap); + va_end(ap); +} diff --git a/src/lib/log.h b/src/lib/log.h index 5b6eced..aa2341e 100644 --- a/src/lib/log.h +++ b/src/lib/log.h @@ -30,6 +30,7 @@ void log_open(const char *path); void log_printf(int lvl, const char *fmt, ...); void log_debug(const char *fmt, ...); +void log_err(const char *fmt, ...); void log_close(); -- 2.7.4