diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 14:42:40 +0000 |
commit | 0de07f4189cbd191a765c60ed3d7c72f72112e68 (patch) | |
tree | 83781a0df06c9110c6f3db12caad23ea00832b53 /libglusterfs/src/logging.c | |
parent | c28972ea53cc7cdb91c7aac01754dd7f0b66e1a7 (diff) | |
parent | 9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff) |
Merge branch 'upstream' into merge
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Conflicts:
api/src/glfs-fops.c
libglusterfs/src/syncop.c
libglusterfs/src/syncop.h
Change-Id: I8c3fa7a20fb167d9e6bc2749e177c0c8b366827b
Diffstat (limited to 'libglusterfs/src/logging.c')
-rw-r--r-- | libglusterfs/src/logging.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 0058233a7..2bd40b2c2 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -138,6 +138,7 @@ gf_log_fini (void *data) call to gf_log after calling gf_log_fini, will log the message to stderr. */ + ctx->log.loglevel = GF_LOG_NONE; ctx->log.logfile = NULL; } } @@ -556,7 +557,7 @@ _gf_log_nomem (const char *domain, const char *file, { if (ctx->log.logfile) { fprintf (ctx->log.logfile, "%s\n", msg); - } else { + } else if (ctx->log.loglevel >= level) { fprintf (stderr, "%s\n", msg); } @@ -711,7 +712,7 @@ _gf_log_callingfn (const char *domain, const char *file, const char *function, { if (ctx->log.logfile) { fprintf (ctx->log.logfile, "%s\n", msg); - } else { + } else if (ctx->log.loglevel >= level) { fprintf (stderr, "%s\n", msg); } @@ -880,7 +881,7 @@ log: if (ctx->log.logfile) { fprintf (ctx->log.logfile, "%s\n", msg); fflush (ctx->log.logfile); - } else { + } else if (ctx->log.loglevel >= level) { fprintf (stderr, "%s\n", msg); fflush (stderr); } |