summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.c
diff options
context:
space:
mode:
authorMohamed Ashiq <ashiq333@gmail.com>2015-05-19 15:46:01 +0530
committerNiels de Vos <ndevos@redhat.com>2015-07-14 02:35:13 -0700
commit2ab34a9c675a6167caed3326b6973854e8529843 (patch)
treeeb72424b707ccf82866b9e1e6e55a576d02e5b65 /libglusterfs/src/stack.c
parent8e19c820dc1427d6bf552562c5df18a5884fd02b (diff)
mem-pool,stack,store,syncop,timer/libglusterfs : Porting to a new logging framework
Backport of http://review.gluster.org/10827 Cherry picked from 2b9b3ef3b646989bbc0412dca187b3f5fcad3283 >Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10827 >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11478 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'libglusterfs/src/stack.c')
-rw-r--r--libglusterfs/src/stack.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libglusterfs/src/stack.c b/libglusterfs/src/stack.c
index 2488cc7f0ba..6977814ec69 100644
--- a/libglusterfs/src/stack.c
+++ b/libglusterfs/src/stack.c
@@ -10,6 +10,7 @@
#include "statedump.h"
#include "stack.h"
+#include "libglusterfs-messages.h"
call_frame_t *
create_frame (xlator_t *xl, call_pool_t *pool)
@@ -44,8 +45,9 @@ create_frame (xlator_t *xl, call_pool_t *pool)
if (stack->ctx->measure_latency) {
if (gettimeofday (&stack->tv, NULL) == -1)
- gf_log ("stack", GF_LOG_ERROR, "gettimeofday () failed."
- " (%s)", strerror (errno));
+ gf_msg ("stack", GF_LOG_ERROR, errno,
+ LG_MSG_GETTIMEOFDAY_FAILED,
+ "gettimeofday () failed");
memcpy (&frame->begin, &stack->tv, sizeof (stack->tv));
}
@@ -388,8 +390,9 @@ gf_proc_dump_pending_frames_to_dict (call_pool_t *call_pool, dict_t *dict)
ret = TRY_LOCK (&call_pool->lock);
if (ret) {
- gf_log (THIS->name, GF_LOG_WARNING, "Unable to dump call pool"
- " to dict. errno: %d", errno);
+ gf_msg (THIS->name, GF_LOG_WARNING, errno,
+ LG_MSG_LOCK_FAILURE, "Unable to dump call "
+ "pool to dict.");
return;
}