summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-12 13:08:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-12 23:39:16 -0700
commit79ec0ccdfacf562f19c0c0959ed305ec204f71bf (patch)
treed722536157d4f6a8493efba32178bf041e8e0b53
parent11c210ea3fdb724af4ea8a221dffc20dad9924a0 (diff)
fix the 'no logfile set' log during gluster process start.
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1348 ('no logfile set' displayed when glusterfs is started) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1348
-rw-r--r--libglusterfs/src/logging.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 2d3bb4c8f25..1998fdc3ea4 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -205,6 +205,9 @@ _gf_log (const char *domain, const char *file, const char *function, int line,
xlator_t *this = NULL;
gf_loglevel_t xlator_loglevel = 0;
+ if (!logfile)
+ return -1;
+
this = THIS;
xlator_loglevel = this->loglevel;
@@ -233,10 +236,6 @@ _gf_log (const char *domain, const char *file, const char *function, int line,
return -1;
}
- if (!logfile) {
- fprintf (stderr, "no logfile set\n");
- return (-1);
- }
if (logrotate) {
logrotate = 0;