diff options
author | Manikandan Selvaganesh <mselvaga@redhat.com> | 2015-04-06 16:21:43 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-06-15 06:26:43 -0700 |
commit | 379dbbfd683d2b0e1704c098b1f020567328122c (patch) | |
tree | 1ef1bd78d6a3bcf19915093463c8ef08b8473335 /xlators/protocol/client/src/client-callback.c | |
parent | 554fa0c1315d0b4b78ba35a2d332d7ac0fd07d48 (diff) |
protocol/client : porting log messages to new framework
Change-Id: I9bf2ca08fef969e566a64475d0f7a16d37e66eeb
BUG: 1194640
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/10042
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-callback.c')
-rw-r--r-- | xlators/protocol/client/src/client-callback.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xlators/protocol/client/src/client-callback.c b/xlators/protocol/client/src/client-callback.c index 2cbad0ca78e..ea8acc910fe 100644 --- a/xlators/protocol/client/src/client-callback.c +++ b/xlators/protocol/client/src/client-callback.c @@ -11,11 +11,12 @@ #include "client.h" #include "rpc-clnt.h" #include "defaults.h" +#include "client-messages.h" int client_cbk_null (struct rpc_clnt *rpc, void *mydata, void *data) { - gf_log (THIS->name, GF_LOG_WARNING, + gf_msg (THIS->name, GF_LOG_WARNING, 0, PC_MSG_FUNCTION_CALL_ERROR, "this function should not be called"); return 0; } @@ -23,7 +24,7 @@ client_cbk_null (struct rpc_clnt *rpc, void *mydata, void *data) int client_cbk_fetchspec (struct rpc_clnt *rpc, void *mydata, void *data) { - gf_log (THIS->name, GF_LOG_WARNING, + gf_msg (THIS->name, GF_LOG_WARNING, 0, PC_MSG_FUNCTION_CALL_ERROR, "this function should not be called"); return 0; } @@ -31,7 +32,7 @@ client_cbk_fetchspec (struct rpc_clnt *rpc, void *mydata, void *data) int client_cbk_ino_flush (struct rpc_clnt *rpc, void *mydata, void *data) { - gf_log (THIS->name, GF_LOG_WARNING, + gf_msg (THIS->name, GF_LOG_WARNING, 0, PC_MSG_FUNCTION_CALL_ERROR, "this function should not be called"); return 0; } @@ -46,7 +47,7 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data) struct gf_upcall_cache_invalidation ca_data = {0,}; gfs3_cbk_cache_invalidation_req ca_req = {0,}; - gf_log (THIS->name, GF_LOG_TRACE, "Upcall callback is called"); + gf_msg_trace (THIS->name, 0, "Upcall callback is called"); if (!rpc || !mydata || !data) goto out; @@ -56,7 +57,8 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data) (xdrproc_t)xdr_gfs3_cbk_cache_invalidation_req); if (ret < 0) { - gf_log (THIS->name, GF_LOG_WARNING, + gf_msg (THIS->name, GF_LOG_WARNING, -ret, + PC_MSG_CACHE_INVALIDATION_FAIL, "XDR decode of cache_invalidation failed."); goto out; } @@ -64,8 +66,8 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data) upcall_data.data = &ca_data; gf_proto_cache_invalidation_to_upcall (&ca_req, &upcall_data); - gf_log (THIS->name, GF_LOG_TRACE, "Upcall gfid = %s, ret = %d", - ca_req.gfid, ret); + gf_msg_trace (THIS->name, 0, "Upcall gfid = %s, ret = %d", + ca_req.gfid, ret); default_notify (THIS, GF_EVENT_UPCALL, &upcall_data); |