projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99ea6c8
)
src/plugin.c: plugin_log: Append newline to message …
author
Florian Forster
<octo@noris.net>
Wed, 21 Apr 2010 14:23:46 +0000
(16:23 +0200)
committer
Florian Forster
<octo@noris.net>
Wed, 21 Apr 2010 14:23:46 +0000
(16:23 +0200)
… even when no log-plugin was loaded.
src/plugin.c
patch
|
blob
|
history
diff --git
a/src/plugin.c
b/src/plugin.c
index
c163ca7
..
647c1fb
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-1459,14
+1459,6
@@
void plugin_log (int level, const char *format, ...)
va_list ap;
llentry_t *le;
- if (list_log == NULL)
- {
- va_start (ap, format);
- vfprintf (stderr, format, ap);
- va_end (ap);
- return;
- }
-
#if !COLLECT_DEBUG
if (level >= LOG_DEBUG)
return;
@@
-1477,6
+1469,12
@@
void plugin_log (int level, const char *format, ...)
msg[sizeof (msg) - 1] = '\0';
va_end (ap);
+ if (list_log == NULL)
+ {
+ fprintf (stderr, "%s\n", msg);
+ return;
+ }
+
le = llist_head (list_log);
while (le != NULL)
{