diff options
author | Anusha Rao <anusha91rao@gmail.com> | 2015-05-04 12:34:09 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2015-08-11 22:36:44 -0700 |
commit | 64e6836ac8fb96f38a859eea0d8525cd9bd2693f (patch) | |
tree | eb00359a9dd7be26f90f9147330a8e2c6fa83232 /xlators/features/changelog/src/changelog-helpers.h | |
parent | 0dcdc8d9d797ed43d305fb3e3437c2576305ac46 (diff) |
features/changelog: Porting log messages to new logging framework
Change-Id: Ic7f842acca52908fd88e0796dc90b82650405b25
BUG: 1194640
Signed-off-by: Anusha Rao <anusha91rao@gmail.com>
Reviewed-on: http://review.gluster.org/10532
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
-rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index 6219d8d9a4b..4427e93f601 100644 --- a/xlators/features/changelog/src/changelog-helpers.h +++ b/xlators/features/changelog/src/changelog-helpers.h @@ -24,6 +24,7 @@ #include "changelog-ev-handle.h" #include "changelog.h" +#include "changelog-messages.h" /** * the changelog entry @@ -644,7 +645,8 @@ resolve_pargfid_to_path (xlator_t *this, uuid_t gfid, char **path, char *bname); #define CHANGELOG_NOT_ON_THEN_GOTO(priv, ret, label) do { \ if (!priv->active) { \ - gf_log (this->name, GF_LOG_WARNING, \ + gf_msg (this->name, GF_LOG_WARNING, 0, \ + CHANGELOG_MSG_NOT_ACTIVE, \ "Changelog is not active, return success"); \ ret = 0; \ goto label; \ @@ -654,17 +656,19 @@ resolve_pargfid_to_path (xlator_t *this, uuid_t gfid, char **path, char *bname); /* Log pthread error and goto label */ #define CHANGELOG_PTHREAD_ERROR_HANDLE_0(ret, label) do { \ if (ret) { \ - gf_log (this->name, GF_LOG_ERROR, \ + gf_msg (this->name, GF_LOG_ERROR, \ + 0, CHANGELOG_MSG_PTHREAD_ERROR, \ "pthread error: Error: %d", ret); \ ret = -1; \ goto label; \ } \ - } while (0) + } while (0); /* Log pthread error, set flag and goto label */ #define CHANGELOG_PTHREAD_ERROR_HANDLE_1(ret, label, flag) do { \ if (ret) { \ - gf_log (this->name, GF_LOG_ERROR, \ + gf_msg (this->name, GF_LOG_ERROR, 0, \ + CHANGELOG_MSG_PTHREAD_ERROR, \ "pthread error: Error: %d", ret); \ ret = -1; \ flag = _gf_true; \ |