summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src/gf-changelog-api.c
diff options
context:
space:
mode:
authorAnusha Rao <anusha91rao@gmail.com>2015-05-04 12:34:09 +0530
committerVenky Shankar <vshankar@redhat.com>2015-08-11 22:36:44 -0700
commit64e6836ac8fb96f38a859eea0d8525cd9bd2693f (patch)
treeeb00359a9dd7be26f90f9147330a8e2c6fa83232 /xlators/features/changelog/lib/src/gf-changelog-api.c
parent0dcdc8d9d797ed43d305fb3e3437c2576305ac46 (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/lib/src/gf-changelog-api.c')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-api.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-api.c b/xlators/features/changelog/lib/src/gf-changelog-api.c
index eee3ad1eefd..63c0098d248 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-api.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-api.c
@@ -15,6 +15,7 @@
#include "gf-changelog-helpers.h"
#include "gf-changelog-journal.h"
#include "changelog-mem-types.h"
+#include "changelog-lib-messages.h"
int
gf_changelog_done (char *file)
@@ -49,13 +50,14 @@ gf_changelog_done (char *file)
(void) snprintf (to_path, PATH_MAX, "%s%s",
jnl->jnl_processed_dir, basename (buffer));
- gf_log (this->name, GF_LOG_DEBUG,
- "moving %s to processed directory", file);
+ gf_msg_debug (this->name, 0,
+ "moving %s to processed directory", file);
ret = rename (buffer, to_path);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "cannot move %s to %s (reason: %s)",
- file, to_path, strerror (errno));
+ gf_msg (this->name, GF_LOG_ERROR, errno,
+ CHANGELOG_LIB_MSG_RENAME_FAILED,
+ "cannot move %s to %s",
+ file, to_path);
goto out;
}
@@ -205,7 +207,8 @@ gf_changelog_scan ()
GF_CHANGELOG_FILL_BUFFER ("\n", buffer, off, 1);
if (gf_changelog_write (tracker_fd, buffer, off) != off) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ CHANGELOG_LIB_MSG_WRITE_FAILED,
"error writing changelog filename"
" to tracker file");
break;