From 1849601d5682ca249e63531391d661d5d7c0271c Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 2 May 2010 10:50:52 +0200 Subject: [PATCH] Add a log handler for libasound --- src/logger.c | 12 ++++++++++++ src/logger.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/logger.c b/src/logger.c index b72d471d..ad3a7cda 100644 --- a/src/logger.c +++ b/src/logger.c @@ -181,6 +181,18 @@ logger_libevent(int severity, const char *msg) DPRINTF(severity, L_EVENT, "%s\n", msg); } +#ifdef LAUDIO_USE_ALSA +void +logger_alsa(const char *file, int line, const char *function, int err, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vlogger(E_LOG, L_LAUDIO, fmt, ap); + va_end(ap); +} +#endif /* LAUDIO_USE_ALSA */ + void logger_reinit(void) { diff --git a/src/logger.h b/src/logger.h index b508a43a..b1a0e7bf 100644 --- a/src/logger.h +++ b/src/logger.h @@ -48,6 +48,11 @@ logger_ffmpeg(void *ptr, int level, const char *fmt, va_list ap); void logger_libevent(int severity, const char *msg); +#ifdef LAUDIO_USE_ALSA +void +logger_alsa(const char *file, int line, const char *function, int err, const char *fmt, ...); +#endif + void logger_reinit(void);