summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
authorMohamed Ashiq <ashiq333@gmail.com>2015-05-19 15:46:01 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-06-26 22:52:01 -0700
commit2b9b3ef3b646989bbc0412dca187b3f5fcad3283 (patch)
tree6426321e1e0ac95e8afb12ab3e3047b7625e18a0 /libglusterfs/src/stack.h
parentf5f5cef19e2afa1e2bcee896269e004353d3180f (diff)
mem-pool,stack,store,syncop,timer/libglusterfs : Porting to a new logging framework
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>
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r--libglusterfs/src/stack.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h
index ffe5c1a1085..5c0655f2ead 100644
--- a/libglusterfs/src/stack.h
+++ b/libglusterfs/src/stack.h
@@ -32,6 +32,7 @@ typedef struct call_pool call_pool_t;
#include "globals.h"
#include "lkowner.h"
#include "client_t.h"
+#include "libglusterfs-messages.h"
#define NFS_PID 1
#define LOW_PRIO_PROC_PID -1
@@ -236,7 +237,6 @@ STACK_RESET (call_stack_t *stack)
\
_new = mem_get0 (frame->root->pool->frame_mem_pool); \
if (!_new) { \
- gf_log ("stack", GF_LOG_ERROR, "alloc failed"); \
break; \
} \
typeof(fn##_cbk) tmp_cbk = rfn; \
@@ -287,7 +287,6 @@ STACK_RESET (call_stack_t *stack)
\
_new = mem_get0 (frame->root->pool->frame_mem_pool); \
if (!_new) { \
- gf_log ("stack", GF_LOG_ERROR, "alloc failed"); \
break; \
} \
typeof(fn##_cbk) tmp_cbk = rfn; \
@@ -323,7 +322,8 @@ STACK_RESET (call_stack_t *stack)
call_frame_t *_parent = NULL; \
xlator_t *old_THIS = NULL; \
if (!frame) { \
- gf_log ("stack", GF_LOG_CRITICAL, "!frame"); \
+ gf_msg ("stack", GF_LOG_CRITICAL, 0, \
+ LG_MSG_FRAME_ERROR, "!frame"); \
break; \
} \
fn = frame->ret; \
@@ -352,7 +352,8 @@ STACK_RESET (call_stack_t *stack)
xlator_t *old_THIS = NULL; \
\
if (!frame) { \
- gf_log ("stack", GF_LOG_CRITICAL, "!frame"); \
+ gf_msg ("stack", GF_LOG_CRITICAL, 0, \
+ LG_MSG_FRAME_ERROR, "!frame"); \
break; \
} \
fn = (fop_##op##_cbk_t )frame->ret; \
@@ -456,8 +457,9 @@ copy_frame (call_frame_t *frame)
if (newstack->ctx->measure_latency) {
if (gettimeofday (&newstack->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 (&newframe->begin, &newstack->tv,
sizeof (newstack->tv));
}