summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/logging.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-31 07:51:14 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-31 10:49:40 -0700
commit6530488a49ed0c9395b091c42b148091075a9d86 (patch)
tree18c85cb3bfa4fc0f0dce0aef27bf6af1ade19af9 /libglusterfs/src/logging.h
parentda5bf7cf104cd060b2f94d47132029689bfff685 (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.h')
-rw-r--r--libglusterfs/src/logging.h8
1 files changed, 4 insertions, 4 deletions
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)) { \