diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2014-06-13 12:01:34 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-06-13 09:58:24 -0700 |
commit | 85055f8a909ed0c5ebb20dd2c1ed34e610c987fe (patch) | |
tree | 3dce69c06c22d92b7fb583e0a3c39a8749443887 /libglusterfs | |
parent | 17f366722124cef253822ba3d78c560e766cb242 (diff) |
logging: Flush log messages logged via gf_log_callingfn()
Change-Id: Id1d83a6c5985dd57ef3cf1e3d2f4d04ff2dbabfa
BUG: 889157
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/8058
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/logging.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 0e6e47b2106..b3626538b96 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -897,8 +897,10 @@ _gf_log_callingfn (const char *domain, const char *file, const char *function, { if (ctx->log.logfile) { fprintf (ctx->log.logfile, "%s\n", msg); + fflush (ctx->log.logfile); } else if (ctx->log.loglevel >= level) { fprintf (stderr, "%s\n", msg); + fflush (stderr); } #ifdef GF_LINUX_HOST_OS |