From 79ec0ccdfacf562f19c0c0959ed305ec204f71bf Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 12 Aug 2010 13:08:38 +0000 Subject: fix the 'no logfile set' log during gluster process start. Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 1348 ('no logfile set' displayed when glusterfs is started) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1348 --- libglusterfs/src/logging.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src') 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; -- cgit