From c3e4bb1bc8c7aac727a236f101c5d9f36a536c5a Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 21 Apr 2009 02:34:02 -0700 Subject: Changed logging format to remove line number & function name from NORMAL and higher levels. Signed-off-by: Anand V. Avati --- libglusterfs/src/logging.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/logging.c') diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index cb1ba5b5af5..53311ac7924 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -190,10 +190,16 @@ log: else basename = file; - fprintf (logfile, "%s %s [%s:%d:%s] %s: ", - timestr, level_strings[level], - basename, line, function, - domain); + if (level >= GF_LOG_DEBUG) { + fprintf (logfile, "[%s] %s [%s:%d:%s] %s: ", + timestr, level_strings[level], + basename, line, function, + domain); + } else { + fprintf (logfile, "[%s] %s %s: ", + timestr, level_strings[level], + domain); + } vfprintf (logfile, fmt, ap); va_end (ap); -- cgit