From: Pavel Rochnyack Date: Wed, 20 Jun 2018 08:12:37 +0000 (+0700) Subject: plugin_mmock.c: Added daemon_log() X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f71007c326f29e3fff754eba56ba275370a265b2;p=collectd.git plugin_mmock.c: Added daemon_log() --- diff --git a/src/daemon/plugin_mock.c b/src/daemon/plugin_mock.c index a11d4f54..1624f0ea 100644 --- a/src/daemon/plugin_mock.c +++ b/src/daemon/plugin_mock.c @@ -170,6 +170,17 @@ void plugin_log(int level, char const *format, ...) { printf("plugin_log (%i, \"%s\");\n", level, buffer); } +void daemon_log(int level, char const *format, ...) { + char buffer[1024]; + va_list ap; + + va_start(ap, format); + vsnprintf(buffer, sizeof(buffer), format, ap); + va_end(ap); + + printf("daemon_log (%i, \"%s\");\n", level, buffer); +} + void plugin_init_ctx(void) { /* nop */ }