summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-set.c
diff options
context:
space:
mode:
authorNandaja Varma <nandaja.varma@gmail.com>2015-06-25 00:57:00 +0530
committerKaushal M <kaushal@redhat.com>2015-06-26 23:56:09 -0700
commit8708953fa3d9187997dc6d484dae663b4469c7ca (patch)
tree38e9ef4db291ee0c1c50805bc08aee6fa3c7780f /xlators/mgmt/glusterd/src/glusterd-volume-set.c
parent08586ee518de438fe2bbbaa74ae4c9a02a5d88cf (diff)
glusterd: Porting left out log messages to new framework
This is a backport of http://review.gluster.org/11388 cherry-picked from commit 23c1e6dc0fa86c014e1a8b6aa5729675f6d69017 >Change-Id: I70d40ae3b5f49a21e1b93f82885cd58fa2723647 >BUG: 1235538 >Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Change-Id: I70d40ae3b5f49a21e1b93f82885cd58fa2723647 BUG: 1217722 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11422 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 3b3dd347c96..7fa070c7d7d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -32,7 +32,8 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
snprintf (errstr, sizeof (errstr), "Volume %s is not a tier "
"volume. Option %s is only valid for tier volume.",
volinfo->volname, key);
- gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ gf_msg (this->name, GF_LOG_ERROR, EINVAL,
+ GD_MSG_INCOMPATIBLE_VALUE, "%s", errstr);
*op_errstr = gf_strdup (errstr);
ret = -1;
goto out;
@@ -49,7 +50,8 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
snprintf (errstr, sizeof (errstr), "%s is not a compatible "
"value. %s expects an integer value.",
value, key);
- gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ gf_msg (this->name, GF_LOG_ERROR, EINVAL,
+ GD_MSG_INCOMPATIBLE_VALUE, "%s", errstr);
*op_errstr = gf_strdup (errstr);
ret = -1;
goto out;
@@ -62,7 +64,8 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
"compatible value. %s expects a positive "
"integer value.",
value, key);
- gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ gf_msg (this->name, GF_LOG_ERROR, EINVAL,
+ GD_MSG_INCOMPATIBLE_VALUE, "%s", errstr);
*op_errstr = gf_strdup (errstr);
ret = -1;
goto out;
@@ -73,7 +76,8 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
"compatible value. %s expects a non-negative"
" integer value.",
value, key);
- gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ gf_msg (this->name, GF_LOG_ERROR, EINVAL,
+ GD_MSG_INCOMPATIBLE_VALUE, "%s", errstr);
*op_errstr = gf_strdup (errstr);
ret = -1;
goto out;
@@ -81,7 +85,7 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
}
out:
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
+ gf_msg_debug (this->name, 0, "Returning %d", ret);
return ret;
}
@@ -164,11 +168,12 @@ validate_defrag_throttle_option (glusterd_volinfo_t *volinfo, dict_t *dict,
ret = -1;
snprintf (errstr, sizeof (errstr), "%s should be "
"{lazy|normal|aggressive}", key);
- gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
+ gf_msg (this->name, GF_LOG_ERROR, EINVAL,
+ GD_MSG_INVALID_ENTRY, "%s", errstr);
*op_errstr = gf_strdup (errstr);
}
- gf_log (this->name, GF_LOG_DEBUG, "Returning %d", ret);
+ gf_msg_debug (this->name, 0, "Returning %d", ret);
return ret;
}