[asterisk-commits] logging: Remove/fix some message annoyances (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 4 14:10:59 CST 2016
Mark Michelson has submitted this change and it was merged.
Change subject: logging: Remove/fix some message annoyances
......................................................................
logging: Remove/fix some message annoyances
test_dlinklists doesn't need to NOTICE everyone that every macro worked.
res_phoneprov doesn't need to VERBOSE everyone that a phoneprov extension or
provider was registered.
res_odbc was missing a newline at the end of one message.
Change-Id: I6c06361518ef3711821795e535acd439782a995e
---
M res/res_odbc.c
M res/res_phoneprov.c
M tests/test_dlinklists.c
3 files changed, 28 insertions(+), 33 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 609d68a..81e1b3c 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -500,7 +500,7 @@
!strncasecmp(v->name, "share", 5) ||
!strcasecmp(v->name, "limit") ||
!strcasecmp(v->name, "idlecheck")) {
- ast_log(LOG_WARNING, "The 'pooling', 'shared_connections', 'limit', and 'idlecheck' options are deprecated. Please see UPGRADE.txt for information");
+ ast_log(LOG_WARNING, "The 'pooling', 'shared_connections', 'limit', and 'idlecheck' options are deprecated. Please see UPGRADE.txt for information\n");
} else if (!strcasecmp(v->name, "enabled")) {
enabled = ast_true(v->value);
} else if (!strcasecmp(v->name, "pre-connect")) {
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c
index cf566b3..51c0b4a 100644
--- a/res/res_phoneprov.c
+++ b/res/res_phoneprov.c
@@ -1476,7 +1476,6 @@
ao2_lock(providers);
i = ao2_iterator_init(providers, 0);
for(; (provider = ao2_iterator_next(&i)); ao2_ref(provider, -1)) {
- ast_log(LOG_VERBOSE, "Reloading provider '%s' users.\n", provider->provider_name);
if (provider->load_users()) {
ast_log(LOG_ERROR, "Unable to load provider '%s' users. Reload aborted.\n", provider->provider_name);
continue;
@@ -1553,7 +1552,6 @@
return -1;
}
- ast_log(LOG_VERBOSE, "Registered phoneprov provider '%s'.\n", provider_name);
return 0;
}
@@ -1606,7 +1604,6 @@
ast_phoneprov_delete_extensions(provider_name);
ao2_find(providers, provider_name, OBJ_SEARCH_KEY | OBJ_NODATA | OBJ_UNLINK);
- ast_log(LOG_VERBOSE, "Unegistered phoneprov provider '%s'.\n", provider_name);
}
int ast_phoneprov_add_extension(char *provider_name, struct varshead *vars)
@@ -1679,7 +1676,6 @@
ast_log(LOG_WARNING, "Could not create http routes for '%s' - skipping\n", user->macaddress);
return -1;
}
- ast_log(LOG_VERBOSE, "Created %s/%s for provider '%s'.\n", username, mac, provider_name);
ao2_link(users, user);
} else {
@@ -1698,7 +1694,6 @@
exten = delete_extension(exten);
return -1;
}
- ast_log(LOG_VERBOSE, "Added %s/%s for provider '%s'.\n", username, mac, provider_name);
}
return 0;
diff --git a/tests/test_dlinklists.c b/tests/test_dlinklists.c
index a449508..581bf4d 100644
--- a/tests/test_dlinklists.c
+++ b/tests/test_dlinklists.c
@@ -70,7 +70,7 @@
strcat(buff," <=> ");
}
- ast_log(LOG_NOTICE,"Got: %s [expect %s]\n", buff, expect);
+ ast_debug(1,"Got: %s [expect %s]\n", buff, expect);
}
static void print_list_backwards(struct test_container *x, char *expect)
@@ -84,7 +84,7 @@
strcat(buff," <=> ");
}
- ast_log(LOG_NOTICE,"Got: %s [expect %s]\n", buff, expect);
+ ast_debug(1,"Got: %s [expect %s]\n", buff, expect);
}
static struct test_container *make_cont(void)
@@ -180,7 +180,7 @@
struct test1 *d;
struct test1 *e;
- ast_log(LOG_NOTICE,"Test AST_DLLIST_INSERT_HEAD, AST_DLLIST_TRAVERSE, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END\n");
+ ast_debug(1,"Test AST_DLLIST_INSERT_HEAD, AST_DLLIST_TRAVERSE, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END\n");
tc = make_cont();
a = make_test1("A");
b = make_test1("B");
@@ -197,9 +197,9 @@
tc = make_cont();
if (AST_DLLIST_EMPTY(&tc->entries))
- ast_log(LOG_NOTICE,"Test AST_DLLIST_EMPTY....OK\n");
+ ast_debug(1,"Test AST_DLLIST_EMPTY....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_EMPTY....PROBLEM!!\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_EMPTY....PROBLEM!!\n");
a = make_test1("A");
@@ -207,7 +207,7 @@
c = make_test1("C");
d = make_test1("D");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_INSERT_TAIL\n");
+ ast_debug(1,"Test AST_DLLIST_INSERT_TAIL\n");
AST_DLLIST_INSERT_TAIL(&tc->entries, a, list);
AST_DLLIST_INSERT_TAIL(&tc->entries, b, list);
AST_DLLIST_INSERT_TAIL(&tc->entries, c, list);
@@ -215,24 +215,24 @@
print_list(tc, "A <=> B <=> C <=> D");
if (AST_DLLIST_FIRST(&tc->entries) == a)
- ast_log(LOG_NOTICE,"Test AST_DLLIST_FIRST....OK\n");
+ ast_debug(1,"Test AST_DLLIST_FIRST....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_FIRST....PROBLEM\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_FIRST....PROBLEM\n");
if (AST_DLLIST_LAST(&tc->entries) == d)
- ast_log(LOG_NOTICE,"Test AST_DLLIST_LAST....OK\n");
+ ast_debug(1,"Test AST_DLLIST_LAST....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_LAST....PROBLEM\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_LAST....PROBLEM\n");
if (AST_DLLIST_NEXT(a,list) == b)
- ast_log(LOG_NOTICE,"Test AST_DLLIST_NEXT....OK\n");
+ ast_debug(1,"Test AST_DLLIST_NEXT....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_NEXT....PROBLEM\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_NEXT....PROBLEM\n");
if (AST_DLLIST_PREV(d,list) == c)
- ast_log(LOG_NOTICE,"Test AST_DLLIST_PREV....OK\n");
+ ast_debug(1,"Test AST_DLLIST_PREV....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_PREV....PROBLEM\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_PREV....PROBLEM\n");
destroy_test_container(tc);
@@ -243,35 +243,35 @@
c = make_test1("C");
d = make_test1("D");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_INSERT_AFTER, AST_DLLIST_TRAVERSE_BACKWARDS\n");
+ ast_debug(1,"Test AST_DLLIST_INSERT_AFTER, AST_DLLIST_TRAVERSE_BACKWARDS\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, b, c, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, c, d, list);
print_list_backwards(tc, "D <=> C <=> B <=> A");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_HEAD\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE_HEAD\n");
AST_DLLIST_REMOVE_HEAD(&tc->entries, list);
print_list_backwards(tc, "D <=> C <=> B");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_HEAD\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE_HEAD\n");
AST_DLLIST_REMOVE_HEAD(&tc->entries, list);
print_list_backwards(tc, "D <=> C");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_HEAD\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE_HEAD\n");
AST_DLLIST_REMOVE_HEAD(&tc->entries, list);
print_list_backwards(tc, "D");
AST_DLLIST_REMOVE_HEAD(&tc->entries, list);
if (AST_DLLIST_EMPTY(&tc->entries))
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_HEAD....OK\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE_HEAD....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_HEAD....PROBLEM!!\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_REMOVE_HEAD....PROBLEM!!\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, b, c, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, c, d, list);
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE\n");
AST_DLLIST_REMOVE(&tc->entries, c, list);
print_list(tc, "A <=> B <=> D");
AST_DLLIST_REMOVE(&tc->entries, a, list);
@@ -281,9 +281,9 @@
AST_DLLIST_REMOVE(&tc->entries, b, list);
if (AST_DLLIST_EMPTY(&tc->entries))
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE....OK\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE....OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE....PROBLEM!!\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_REMOVE....PROBLEM!!\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
@@ -295,11 +295,11 @@
}
AST_DLLIST_TRAVERSE_SAFE_END;
if (AST_DLLIST_EMPTY(&tc->entries))
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_CURRENT... OK\n");
+ ast_debug(1,"Test AST_DLLIST_REMOVE_CURRENT... OK\n");
else
- ast_log(LOG_NOTICE,"Test AST_DLLIST_REMOVE_CURRENT... PROBLEM\n");
+ ast_log(LOG_ERROR,"Test AST_DLLIST_REMOVE_CURRENT... PROBLEM\n");
- ast_log(LOG_NOTICE,"Test AST_DLLIST_MOVE_CURRENT, AST_DLLIST_INSERT_BEFORE_CURRENT\n");
+ ast_debug(1,"Test AST_DLLIST_MOVE_CURRENT, AST_DLLIST_INSERT_BEFORE_CURRENT\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, b, c, list);
@@ -325,7 +325,7 @@
c = make_test1("C");
d = make_test1("D");
- ast_log(LOG_NOTICE,"Test: AST_DLLIST_MOVE_CURRENT_BACKWARDS and AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS\n");
+ ast_debug(1,"Test: AST_DLLIST_MOVE_CURRENT_BACKWARDS and AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, b, c, list);
--
To view, visit https://gerrit.asterisk.org/2183
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c06361518ef3711821795e535acd439782a995e
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list