diff options
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/logging.c | 14 |
1 files changed, 10 insertions, 4 deletions
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); |