projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
772e602
)
If the file isn't closed such as when logging to stdout or stderr the file must be...
author
Nathan Huff
<nrhuff@umn.edu>
Thu, 24 Jan 2013 16:10:02 +0000
(10:10 -0600)
committer
Florian Forster
<octo@collectd.org>
Fri, 25 Jan 2013 07:37:17 +0000
(08:37 +0100)
Signed-off-by: Florian Forster <octo@collectd.org>
src/logfile.c
patch
|
blob
|
history
diff --git
a/src/logfile.c
b/src/logfile.c
index
6d0f6e0
..
e063dd0
100644
(file)
--- a/
src/logfile.c
+++ b/
src/logfile.c
@@
-164,8
+164,11
@@
static void logfile_print (const char *msg, int severity, time_t timestamp_time)
else
fprintf (fh, "%s%s\n", level_str, msg);
- if (do_close != 0)
+ if (do_close != 0)
{
fclose (fh);
+ } else {
+ fflush(fh);
+ }
}
pthread_mutex_unlock (&file_lock);