summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/src/changelog-helpers.h
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2017-10-12 11:31:34 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-15 14:17:58 +0000
commitf65ad580cf81b4853fa496b628f3dfd9d7b66ee9 (patch)
treea4b939c1b360986c32dba1268938f8641988289b /xlators/features/changelog/src/changelog-helpers.h
parent53e28cc98c4cda61dc0d1f8ce8dcf3d77dcacb15 (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-helpers.h')
-rw-r--r--xlators/features/changelog/src/changelog-helpers.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h
index 4fdba244aa1..39a792891dd 100644
--- a/xlators/features/changelog/src/changelog-helpers.h
+++ b/xlators/features/changelog/src/changelog-helpers.h
@@ -656,9 +656,9 @@ resolve_pargfid_to_path (xlator_t *this, const uuid_t gfid, char **path,
/* Log pthread error and goto label */
#define CHANGELOG_PTHREAD_ERROR_HANDLE_0(ret, label) do { \
if (ret) { \
- gf_msg (this->name, GF_LOG_ERROR, \
- 0, CHANGELOG_MSG_PTHREAD_ERROR, \
- "pthread error: Error: %d", ret); \
+ gf_smsg (this->name, GF_LOG_ERROR, \
+ 0, CHANGELOG_MSG_PTHREAD_ERROR, \
+ "pthread error", "error=%d", ret, NULL); \
ret = -1; \
goto label; \
} \
@@ -667,9 +667,9 @@ resolve_pargfid_to_path (xlator_t *this, const uuid_t gfid, char **path,
/* Log pthread error, set flag and goto label */
#define CHANGELOG_PTHREAD_ERROR_HANDLE_1(ret, label, flag) do { \
if (ret) { \
- gf_msg (this->name, GF_LOG_ERROR, 0, \
- CHANGELOG_MSG_PTHREAD_ERROR, \
- "pthread error: Error: %d", ret); \
+ gf_smsg (this->name, GF_LOG_ERROR, 0, \
+ CHANGELOG_MSG_PTHREAD_ERROR, \
+ "pthread error", "error=%d", ret, NULL); \
ret = -1; \
flag = _gf_true; \
goto label; \