- for (i = 0; i < NUM_LOGLEVELS; i++) {
- int ret = color_parse(default_log_colors[i], me->log_colors[i]);
- assert(ret >= 0);
- }
-}
-
-static int get_loglevel_by_name(const char *txt, size_t n)
-{
- if (!strncasecmp(txt, "debug", n))
- return LL_DEBUG;
- if (!strncasecmp(txt, "info", n))
- return LL_INFO;
- if (!strncasecmp(txt, "notice", n))
- return LL_NOTICE;
- if (!strncasecmp(txt, "warning", n))
- return LL_WARNING;
- if (!strncasecmp(txt, "error", n))
- return LL_ERROR;
- if (!strncasecmp(txt, "crit", n))
- return LL_CRIT;
- if (!strncasecmp(txt, "emerg", n))
- return LL_EMERG;
- return -1;
+ for (i = 0; i < NUM_LOGLEVELS; i++)
+ color_parse_or_die(default_log_colors[i], me->log_colors[i]);