summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src/gf-changelog.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-changelog.c')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index 874ffd0d13b..5972e7052d8 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -34,6 +34,7 @@
/* from the changelog translator */
#include "changelog-misc.h"
#include "changelog-mem-types.h"
+#include "changelog-lib-messages.h"
/**
* Global singleton xlator pointer for the library, initialized
@@ -243,7 +244,8 @@ gf_changelog_setup_rpc (xlator_t *this,
*/
ret = gf_changelog_invoke_rpc (this, entry, proc);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ CHANGELOG_LIB_MSG_INVOKE_RPC_FAILED,
"Could not initiate probe RPC, bailing out!!!");
goto error_return;
}
@@ -261,10 +263,10 @@ gf_cleanup_event (xlator_t *this, struct gf_event_list *ev)
ret = gf_thread_cleanup (this, ev->invoker);
if (ret) {
- gf_log (this->name, GF_LOG_WARNING,
- "cannot cleanup callback invoker thread "
- " [reason: %s]. Not freeing resources",
- strerror (-ret));
+ gf_msg (this->name, GF_LOG_WARNING, -ret,
+ CHANGELOG_LIB_MSG_CLEANUP_ERROR,
+ "cannot cleanup callback invoker thread."
+ " Not freeing resources");
return -1;
}
@@ -395,7 +397,7 @@ gf_setup_brick_connection (xlator_t *this,
cleanup_event:
(void) gf_cleanup_event (this, &entry->event);
free_entry:
- gf_log (this->name, GF_LOG_DEBUG, "freeing entry %p", entry);
+ gf_msg_debug (this->name, 0, "freeing entry %p", entry);
list_del (&entry->list); /* FIXME: kludge for now */
GF_FREE (entry);
error_return:
@@ -459,7 +461,8 @@ gf_changelog_set_master (xlator_t *master, void *xl)
NULL, changelog_rpc_poller, THIS);
if (ret != 0) {
GF_FREE (priv);
- gf_log (master->name, GF_LOG_ERROR,
+ gf_msg (master->name, GF_LOG_ERROR, 0,
+ CHANGELOG_LIB_MSG_THREAD_CREATION_FAILED,
"failed to spawn poller thread");
goto restore_this;
}
@@ -537,13 +540,15 @@ gf_changelog_register_generic (struct gf_brick_spec *bricks, int count,
brick = bricks;
while (count--) {
- gf_log (this->name, GF_LOG_INFO,
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ CHANGELOG_LIB_MSG_NOTIFY_REGISTER_INFO,
"Registering brick: %s [notify filter: %d]",
brick->brick_path, brick->filter);
ret = gf_changelog_register_brick (this, brick, need_order, xl);
if (ret != 0) {
- gf_log (this->name, GF_LOG_ERROR,
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ CHANGELOG_LIB_MSG_NOTIFY_REGISTER_FAILED,
"Error registering with changelog xlator");
break;
}