From 4ae3853d857e584189289b33f8ba929fbd9cc7e1 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 31 Aug 2010 04:10:17 +0000 Subject: Add command logging facility for glusterd Added new command logging facility to gf_cmd_log() which can be used to log all commands to a .cmd_log_history file situated in the glusterd working directory. Accepts 1 st argument a domain string (e.g: volume, peer..) followed by msg string (similar to gf_log) Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 1404 (need a dump of all the op/mgmt commands) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1404 --- libglusterfs/src/logging.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libglusterfs/src/logging.h') diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h index f727bfe42..39b593850 100644 --- a/libglusterfs/src/logging.h +++ b/libglusterfs/src/logging.h @@ -120,4 +120,9 @@ void gf_log_set_xl_loglevel (void *xl, gf_loglevel_t level); #define GF_ERROR(xl, format, args...) \ gf_log ((xl)->name, GF_LOG_ERROR, format, ##args) +int +gf_cmd_log (const char *domain, const char *fmt, ...); + +int +gf_cmd_log_init (const char *filename); #endif /* __LOGGING_H__ */ -- cgit