diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-31 07:51:14 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-31 10:49:40 -0700 |
commit | 6530488a49ed0c9395b091c42b148091075a9d86 (patch) | |
tree | 18c85cb3bfa4fc0f0dce0aef27bf6af1ade19af9 /libglusterfs/src/logging.c | |
parent | da5bf7cf104cd060b2f94d47132029689bfff685 (diff) |
'gluster volume log' feature added
* 'gluster volume log filename <VOLNAME> [BRICK] <path>'
* 'gluster volume log locate <VOLNAME> [BRICK]'
* 'gluster volume log rotate <VOLUME> [BRICK]'
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src/logging.c')
-rw-r--r-- | libglusterfs/src/logging.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index c152e4a28..4493b05c7 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -43,11 +43,11 @@ static pthread_mutex_t logfile_mutex; static char *filename = NULL; static uint8_t logrotate = 0; - static FILE *logfile = NULL; static gf_loglevel_t loglevel = GF_LOG_MAX; static int gf_log_syslog = 0; +char gf_log_xl_log_set; gf_loglevel_t gf_log_loglevel; /* extern'd */ FILE *gf_log_logfile; @@ -100,6 +100,7 @@ gf_log_set_xl_loglevel (void *this, gf_loglevel_t level) xlator_t *xl = this; if (!xl) return; + gf_log_xl_log_set = 1; xl->loglevel = level; } @@ -261,10 +262,6 @@ log: tm = localtime (&tv.tv_sec); - if (level > xlator_loglevel) { - goto out; - } - pthread_mutex_lock (&logfile_mutex); { va_start (ap, fmt); |