aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debug.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 271b9fe..7f46af7 100644
--- a/debug.c
+++ b/debug.c
@@ -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, ...)