projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddeaf84
)
plugin_mmock.c: Added daemon_log()
author
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 20 Jun 2018 08:12:37 +0000
(15:12 +0700)
committer
Pavel Rochnyack
<pavel2000@ngs.ru>
Wed, 20 Jun 2018 09:20:50 +0000
(16:20 +0700)
src/daemon/plugin_mock.c
patch
|
blob
|
history
diff --git
a/src/daemon/plugin_mock.c
b/src/daemon/plugin_mock.c
index
a11d4f5
..
1624f0e
100644
(file)
--- 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 */
}