From 6530488a49ed0c9395b091c42b148091075a9d86 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 31 Aug 2010 07:51:14 +0000 Subject: 'gluster volume log' feature added * 'gluster volume log filename [BRICK] ' * 'gluster volume log locate [BRICK]' * 'gluster volume log rotate [BRICK]' Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur --- libglusterfs/src/logging.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/logging.h') diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h index 39b593850..e440d5975 100644 --- a/libglusterfs/src/logging.h +++ b/libglusterfs/src/logging.h @@ -73,14 +73,14 @@ typedef enum { #define GF_LOG_MAX GF_LOG_DEBUG extern gf_loglevel_t gf_log_loglevel; +extern char gf_log_xl_log_set; #define gf_log(dom, levl, fmt...) do { \ + if ((levl > gf_log_loglevel) && !gf_log_xl_log_set) \ + break; \ _gf_log (dom, __FILE__, __FUNCTION__, __LINE__, \ levl, ##fmt); \ - if (0) { \ - printf (fmt); \ - } \ -} while (0) + } while (0) /* Log once in GF_UNIVERSAL_ANSWER times */ #define GF_LOG_OCCASIONALLY(var, args...) if (!(var++%GF_UNIVERSAL_ANSWER)) { \ -- cgit