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:32:01 -0700
commit911e9228f31e89fe5df6e2282ce449b2a94c42b1 (patch)
tree517bb1fd3d56c6016b21bc394956064ee56294ab /xlators/mgmt/glusterd/src/glusterd-volume-set.c
parent2b9b3ef3b646989bbc0412dca187b3f5fcad3283 (diff)
glusterd: Porting left out log messages to new framework
Change-Id: I70d40ae3b5f49a21e1b93f82885cd58fa2723647 BUG: 1235538 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11388 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.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 78220ef1db7..22abeefe32e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -27,7 +27,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;
@@ -44,7 +45,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;
@@ -57,7 +59,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;
@@ -68,7 +71,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;
@@ -76,7 +80,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;
}
@@ -159,11 +163,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;
}