diff options
| author | Amar Tumballi <amar@gluster.com> | 2011-03-09 07:24:08 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-09 05:45:19 -0800 | 
| commit | ce334f63c7e861bda0fabd0754a2b5c48157d001 (patch) | |
| tree | bb1fff573f2d4e3e722a9fb041f1286299140f41 /libglusterfs/src/logging.c | |
| parent | 173638aae1236667e052493d46a90b23b14a2fad (diff) | |
libglusterfs: add 'graph_id' in logging
to help in distinguishing logs from previous graph and current graph,
once a 'add-brick', 'remove-brick' or 'replace-brick' is done.
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.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 78bd1d6103f..5b9f2aee204 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -287,10 +287,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;                  } @@ -423,10 +423,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;                  }  | 
