diff options
author | Humble Devassy Chirammal <hchiramm@redhat.com> | 2015-04-25 12:44:15 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-07 03:30:51 -0700 |
commit | 97b7150003deb44c0e7f458e795b9dfce6478f13 (patch) | |
tree | f4e35b4e8031d2cf82b83804803e502260e8e4c7 /api/src/glfs-master.c | |
parent | 3994afd6140c828edceca271974f5a90c4c70fad (diff) |
libgfapi : port gfapi to new logging framework
This also contains backport of http://review.gluster.org/10456:
- Fix ENOKEY build failure on non Linux systems
Cherry picked from commit 8986a47c54db4769feb4e6664532386f1cd0275d:
> Change-Id: Iaa0a92f82b9a0a26eda1a8d72b3b66ce66fab443
> BUG: 1194640
> Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
> Reviewed-on: http://review.gluster.org/9918
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
> Reviewed-by: soumya k <skoduri@redhat.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Change-Id: I320b4f1268d49a1a1086412ff2a9fb815bcf1cf4
BUG: 1217722
Change-Id: I320b4f1268d49a1a1086412ff2a9fb815bcf1cf4
Reviewed-on: http://review.gluster.org/10486
Tested-by: NetBSD Build System
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Diffstat (limited to 'api/src/glfs-master.c')
-rw-r--r-- | api/src/glfs-master.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index dfce2f9b78c..11843c15b4d 100644 --- a/api/src/glfs-master.c +++ b/api/src/glfs-master.c @@ -25,6 +25,7 @@ #include "glfs-internal.h" #include "glfs-mem-types.h" +#include "gfapi-messages.h" int @@ -88,7 +89,8 @@ notify (xlator_t *this, int event, void *data, ...) switch (event) { case GF_EVENT_GRAPH_NEW: - gf_log (this->name, GF_LOG_INFO, "New graph %s (%d) coming up", + gf_msg (this->name, GF_LOG_INFO, 0, API_MSG_NEW_GRAPH, + "New graph %s (%d) coming up", uuid_utoa ((unsigned char *)graph->graph_uuid), graph->id); break; @@ -117,8 +119,7 @@ notify (xlator_t *this, int event, void *data, ...) glfs_process_upcall_event (fs, data); break; default: - gf_log (this->name, GF_LOG_DEBUG, - "got notify event %d", event); + gf_msg_debug (this->name, 0, "got notify event %d", event); break; } @@ -136,7 +137,8 @@ mem_acct_init (xlator_t *this) ret = xlator_mem_acct_init (this, glfs_mt_end + 1); if (ret) { - gf_log (this->name, GF_LOG_ERROR, "Failed to initialise " + gf_msg (this->name, GF_LOG_ERROR, ENOMEM, + API_MSG_MEM_ACCT_INIT_FAILED, "Failed to initialise " "memory accounting"); return ret; } |