From 8c20f8bd0be0a797f57a5e68473d857357a16f9e Mon Sep 17 00:00:00 2001 From: Mohamed Ashiq Date: Tue, 19 May 2015 15:21:46 +0530 Subject: event,parse-utils,quota-common-utils,rbthash/libglusterfs : Porting to new logging framework Backport of http://review.gluster.org/10823 Cherry-picked from a9b6933ef097d2a81ce21a8aeda2acc569cd1509 >Change-Id: I13ae9a97fe442c06cf50fe77c63718ea0858dc4d >BUG: 1194640 >Signed-off-by: Mohamed Ashiq >Reviewed-on: http://review.gluster.org/10823 >Tested-by: NetBSD Build System >Reviewed-by: Pranith Kumar Karampuri Change-Id: I13ae9a97fe442c06cf50fe77c63718ea0858dc4d BUG: 1217722 Signed-off-by: Mohamed Ashiq Reviewed-on: http://review.gluster.org/11404 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri --- libglusterfs/src/parse-utils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libglusterfs/src/parse-utils.c') diff --git a/libglusterfs/src/parse-utils.c b/libglusterfs/src/parse-utils.c index f7e9988ab64..304232f6b56 100644 --- a/libglusterfs/src/parse-utils.c +++ b/libglusterfs/src/parse-utils.c @@ -20,6 +20,7 @@ #include "parse-utils.h" #include "mem-pool.h" #include "common-utils.h" +#include "libglusterfs-messages.h" /** * parser_init: Initialize a parser with the a string to parse and @@ -46,8 +47,6 @@ parser_init (const char *regex) parser->regex = gf_strdup (regex); if (!parser->regex) { - gf_log (GF_PARSE, GF_LOG_INFO, - "Failed to duplicate regex string!"); GF_FREE (parser); parser = NULL; goto out; @@ -55,7 +54,7 @@ parser_init (const char *regex) rc = regcomp (&parser->preg, parser->regex, REG_EXTENDED); if (rc != 0) { - gf_log (GF_PARSE, GF_LOG_INFO, + gf_msg (GF_PARSE, GF_LOG_INFO, 0, LG_MSG_REGEX_OP_FAILED, "Failed to compile regex pattern."); parser_deinit (parser); parser = NULL; @@ -160,7 +159,7 @@ parser_get_next_match (struct parser *parser) rc = regexec (&parser->preg, parser->_rstr, 1, parser->pmatch, 0); if (rc != 0) { - gf_log (GF_PARSE, GF_LOG_DEBUG, + gf_msg_debug (GF_PARSE, 0, "Could not match %s with regex %s", parser->_rstr, parser->regex); goto out; -- cgit