summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-21 02:34:02 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-24 20:57:42 +0530
commitc3e4bb1bc8c7aac727a236f101c5d9f36a536c5a (patch)
treecf422aac9ee5ad0957e5b52b8828b874412a730a /libglusterfs
parentb52a5a408b82496a295c1065f2286c6755a04689 (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.c14
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);