summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard/src/shard.h
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2015-09-21 16:57:07 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-09-27 23:08:36 -0700
commit0428a0acf7cfeef6a92065eeca2b8904b0f8a132 (patch)
tree79bc2b1222cf5420edad48e5078de2d097bae408 /xlators/features/shard/src/shard.h
parent1d82db506d1cd5b20d14820d89033de2e4a14210 (diff)
features/shard: Port log messages to new framework
Change-Id: Iac01e6a89a0d0c37a12a5e47f17f7ced85a31590 BUG: 1265516 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12217 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/shard/src/shard.h')
-rw-r--r--xlators/features/shard/src/shard.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/features/shard/src/shard.h b/xlators/features/shard/src/shard.h
index ce6952f91fd..69414bfe1b5 100644
--- a/xlators/features/shard/src/shard.h
+++ b/xlators/features/shard/src/shard.h
@@ -14,6 +14,7 @@
#include "xlator.h"
#include "compat-errno.h"
+#include "shard-messages.h"
#define GF_SHARD_DIR ".shard"
#define SHARD_MIN_BLOCK_SIZE (4 * GF_UNIT_MB)
@@ -104,7 +105,8 @@
&local->block_size, \
sizeof (local->block_size)); \
if (__ret) { \
- gf_log (this->name, GF_LOG_WARNING, "Failed to set key: %s " \
+ gf_msg (this->name, GF_LOG_WARNING, 0, \
+ SHARD_MSG_DICT_SET_FAILED, "Failed to set key: %s " \
"on path %s", GF_XATTR_SHARD_BLOCK_SIZE, loc->path); \
goto label; \
} \
@@ -116,7 +118,8 @@
__ret = dict_set_bin (xattr_req, GF_XATTR_SHARD_FILE_SIZE, \
__size_attr, 8 * 4); \
if (__ret) { \
- gf_log (this->name, GF_LOG_WARNING, "Failed to set key: %s " \
+ gf_msg (this->name, GF_LOG_WARNING, 0, \
+ SHARD_MSG_DICT_SET_FAILED, "Failed to set key: %s " \
"on path %s", GF_XATTR_SHARD_FILE_SIZE, loc->path); \
GF_FREE (__size_attr); \
goto label; \
@@ -131,8 +134,9 @@
if (__ret) { \
local->op_ret = -1; \
local->op_errno = ENOMEM; \
- gf_log (this->name, GF_LOG_WARNING, "Failed to set dict" \
- " value: key:%s for %s.", GF_XATTR_SHARD_FILE_SIZE, \
+ gf_msg (this->name, GF_LOG_WARNING, 0, \
+ SHARD_MSG_DICT_SET_FAILED, "Failed to set dict value:"\
+ " key:%s for %s.", GF_XATTR_SHARD_FILE_SIZE, \
uuid_utoa (gfid)); \
goto label; \
} \