From 038dfe57cf0c5944b0392332dbf5a00bb1208150 Mon Sep 17 00:00:00 2001 From: Mohamed Ashiq Date: Wed, 12 Aug 2015 15:21:17 +0530 Subject: libglusterfs:Porting log messages to new framework Change-Id: I8625b7dc8941720cc7a864b8fddbcc7b4c485fcd BUG: 1252836 Signed-off-by: Mohamed Ashiq Reviewed-on: http://review.gluster.org/11896 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Manikandan Selvaganesh Reviewed-by: Niels de Vos --- libglusterfs/src/xlator.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 76077c7a360..30775354253 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -976,8 +976,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value) /* Some crude way to change the log-level of process */ if (!strcmp (name, "trusted.glusterfs.set-log-level")) { - /* */ - gf_log ("glusterfs", gf_log_get_loglevel(), + gf_msg ("glusterfs", gf_log_get_loglevel(), 0, + LG_MSG_SET_LOG_LEVEL, "setting log level to %d (old-value=%d)", log_level, gf_log_get_loglevel()); gf_log_set_loglevel (log_level); @@ -987,7 +987,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value) if (!strcmp (name, "trusted.glusterfs.fuse.set-log-level")) { /* */ - gf_log (this->name, gf_log_get_xl_loglevel (this), + gf_msg (this->name, gf_log_get_xl_loglevel (this), 0, + LG_MSG_SET_LOG_LEVEL, "setting log level to %d (old-value=%d)", log_level, gf_log_get_xl_loglevel (this)); gf_log_set_xl_loglevel (this, log_level); @@ -1006,7 +1007,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value) snprintf (key, 1024, "trusted.glusterfs.%s.set-log-level", trav->name); if (fnmatch (name, key, FNM_NOESCAPE) == 0) { - gf_log (trav->name, gf_log_get_xl_loglevel (trav), + gf_msg (trav->name, gf_log_get_xl_loglevel (trav), 0, + LG_MSG_SET_LOG_LEVEL, "setting log level to %d (old-value=%d)", log_level, gf_log_get_xl_loglevel (trav)); gf_log_set_xl_loglevel (trav, log_level); -- cgit