summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/logging.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-18 00:38:13 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-18 20:36:30 -0700
commit131d82cacd4600654d3e931287d2556f50bd9db5 (patch)
treed2fa03337ccd6ec1149989739592dadf8fa57938 /libglusterfs/src/logging.c
parent3d912aa905105098db1eea1e4c3e9c42aa0c7da7 (diff)
libglusterfs: added graph id in logging
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'libglusterfs/src/logging.c')
-rw-r--r--libglusterfs/src/logging.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 2f598a6dc1a..c7f2561507b 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -395,10 +395,10 @@ _gf_log_callingfn (const char *domain, const char *file, const char *function,
else
basename = file;
- ret = gf_asprintf (&str1, "[%s] %s [%s:%d:%s] %s %s: ",
+ ret = gf_asprintf (&str1, "[%s] %s [%s:%d:%s] %s %d-%s: ",
timestr, level_strings[level],
basename, line, function, callstr,
- domain);
+ ((this->graph) ? this->graph->id:0), domain);
if (-1 == ret) {
goto unlock;
}
@@ -534,10 +534,10 @@ log:
else
basename = file;
- ret = gf_asprintf (&str1, "[%s] %s [%s:%d:%s] %s: ",
+ ret = gf_asprintf (&str1, "[%s] %s [%s:%d:%s] %d-%s: ",
timestr, level_strings[level],
basename, line, function,
- domain);
+ ((this->graph)?this->graph->id:0), domain);
if (-1 == ret) {
goto unlock;
}