diff options
author | Aravinda VK <avishwan@redhat.com> | 2017-10-12 11:31:34 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-11-15 14:17:58 +0000 |
commit | f65ad580cf81b4853fa496b628f3dfd9d7b66ee9 (patch) | |
tree | a4b939c1b360986c32dba1268938f8641988289b /xlators/features/changelog/src/changelog-ev-handle.c | |
parent | 53e28cc98c4cda61dc0d1f8ce8dcf3d77dcacb15 (diff) |
features/changelog: Structured logging support
Structured logging infra is available in logging library with
issue #240. Log messages with dynamic content are identified and
converted to structured logging format(`gf_msg` to `gf_smsg` and
`gf_log` to `gf_slog`)
BUG: 1501054
Change-Id: I5fccc354730c07cb9ae444d0b959d1d72bd9be49
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-ev-handle.c')
-rw-r--r-- | xlators/features/changelog/src/changelog-ev-handle.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/features/changelog/src/changelog-ev-handle.c b/xlators/features/changelog/src/changelog-ev-handle.c index 38e127b7eb5..a7f485b019f 100644 --- a/xlators/features/changelog/src/changelog-ev-handle.c +++ b/xlators/features/changelog/src/changelog-ev-handle.c @@ -209,10 +209,11 @@ changelog_ev_connector (void *data) crpc->sock, changelog_rpc_notify); if (!crpc->rpc) { - gf_msg (this->name, GF_LOG_ERROR, 0, - CHANGELOG_MSG_RPC_CONNECT_ERROR, - "failed to connect back.. <%s>", - crpc->sock); + gf_smsg (this->name, GF_LOG_ERROR, 0, + CHANGELOG_MSG_RPC_CONNECT_ERROR, + "failed to connect back", + "path=%s", crpc->sock, + NULL); crpc->cleanup (crpc); goto mutex_unlock; } @@ -351,10 +352,11 @@ changelog_ev_dispatch (void *data) &opaque, sequencer, c_clnt); if (ret != RBUF_CONSUMABLE) { if (ret != RBUF_EMPTY) - gf_msg (this->name, GF_LOG_WARNING, 0, - CHANGELOG_MSG_BUFFER_STARVATION_ERROR, - "Failed to get buffer for RPC dispatch " - "[rbuf retval: %d]", ret); + gf_smsg (this->name, GF_LOG_WARNING, 0, + CHANGELOG_MSG_BUFFER_STARVATION_ERROR, + "Failed to get buffer for RPC dispatch", + "rbuf_retval=%d", ret, + NULL); continue; } |