diff options
| author | Mohamed Ashiq <ashiq333@gmail.com> | 2015-05-19 15:46:01 +0530 |
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2015-07-14 02:35:13 -0700 |
| commit | 2ab34a9c675a6167caed3326b6973854e8529843 (patch) | |
| tree | eb72424b707ccf82866b9e1e6e55a576d02e5b65 /libglusterfs/src/stack.h | |
| parent | 8e19c820dc1427d6bf552562c5df18a5884fd02b (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.h')
| -rw-r--r-- | libglusterfs/src/stack.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index c3a4f79bbec..21f9d1739f0 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -37,6 +37,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 @@ -241,7 +242,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; \ @@ -292,7 +292,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; \ @@ -328,7 +327,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; \ @@ -357,7 +357,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; \ @@ -461,8 +462,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)); } |
