diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-04-21 02:34:02 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-24 20:57:42 +0530 |
commit | c3e4bb1bc8c7aac727a236f101c5d9f36a536c5a (patch) | |
tree | cf422aac9ee5ad0957e5b52b8828b874412a730a /libglusterfs | |
parent | b52a5a408b82496a295c1065f2286c6755a04689 (diff) |
Changed logging format to remove line number & function name from NORMAL and higher levels.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs')
-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 cb1ba5b5a..53311ac79 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); |