From 830a3dc46438b1cf18bcd35cca05c164e77180f1 Mon Sep 17 00:00:00 2001 From: yatipadia Date: Mon, 25 Nov 2019 19:57:09 +0530 Subject: api-glfs-fops: structure logging Convert gf_msg() to gf_smsg() Change-Id: Iceb40d60a75106c7b4b0a2487b611f7376bccc46 Updates: #657 Signed-off-by: yatipadia --- api/src/glfs-master.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'api/src/glfs-master.c') diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index 4bc69d1f3d8..100dcc16cc0 100644 --- a/api/src/glfs-master.c +++ b/api/src/glfs-master.c @@ -75,9 +75,10 @@ notify(xlator_t *this, int event, void *data, ...) switch (event) { case GF_EVENT_GRAPH_NEW: - 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); + gf_smsg(this->name, GF_LOG_INFO, 0, API_MSG_NEW_GRAPH, + "graph-uuid=%s", + uuid_utoa((unsigned char *)graph->graph_uuid), "id=%d", + graph->id, NULL); break; case GF_EVENT_CHILD_UP: pthread_mutex_lock(&fs->mutex); @@ -120,9 +121,8 @@ mem_acct_init(xlator_t *this) ret = xlator_mem_acct_init(this, glfs_mt_end + 1); if (ret) { - gf_msg(this->name, GF_LOG_ERROR, ENOMEM, API_MSG_MEM_ACCT_INIT_FAILED, - "Failed to initialise " - "memory accounting"); + gf_smsg(this->name, GF_LOG_ERROR, ENOMEM, API_MSG_MEM_ACCT_INIT_FAILED, + NULL); return ret; } -- cgit