aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-19 15:29:28 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-19 15:29:28 +0000
commit03d43d670caa8a84b9b87a9673bea0204c34aa15 (patch)
tree00839f9270516fc21cf94153dbe5ab7c913f65ed /main/logger.c
parent277ba396c8501efd4b653ab491b42ce7779a26a3 (diff)
Add ability for logger channels to include *all* levels.
Now that Asterisk modules can dynamically create and destroy logger levels on demand, it's useful to be able to configure a logger channel (console, file, whatever) to be able to accept log messages from *all* levels, even levels created dynamically. This patch adds support for this, by allowing the '*' level name to be used in logger.conf. Review: https://reviewboard.asterisk.org/r/663/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@264160 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/logger.c b/main/logger.c
index 0038c5f44..3b66854a1 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -214,14 +214,14 @@ static unsigned int make_components(const char *s, int lineno)
unsigned int x;
while ((w = strsep(&stringp, ","))) {
- int found = 0;
-
w = ast_skip_blanks(w);
- for (x = 0; x < ARRAY_LEN(levels); x++) {
+ if (!strcmp(w, "*")) {
+ res = 0xFFFF;
+ break;
+ } else for (x = 0; x < ARRAY_LEN(levels); x++) {
if (levels[x] && !strcasecmp(w, levels[x])) {
res |= (1 << x);
- found = 1;
break;
}
}