diff options
Diffstat (limited to '')
-rw-r--r-- | debug.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -6,14 +6,21 @@ static void _debug(const char *format, va_list ap) { + char *fmt; + + t_push(); + + fmt = t_strconcat(stringify(PLUGINNAME), ": ", format, NULL); + #if defined(DEBUG_SYSLOG) - vsyslog(LOG_DEBUG, format, ap); + vsyslog(LOG_DEBUG, fmt, ap); #elif defined(DEBUG_STDERR) - vfprintf(stderr, format, ap); + vfprintf(stderr, fmt, ap); fflush(stderr); #else #error no logging method #endif + t_pop(); } void debug(const char *fmt, ...) |