config: enable log_level through environment variable
@@ -381,8 +381,16 @@ int flb_config_set_property(struct flb_config *config,
while (key != NULL) {
if (prop_key_check(key, k,len) == 0) {
if (!strncasecmp(key, FLB_CONF_STR_LOGLEVEL, 256)) {
+ tmp = flb_env_var_translate(config->env, v);
+ if (tmp) {
+ ret = set_log_level(config, tmp);
+ flb_free(tmp);
+ tmp = NULL;
+ }
+ else {
ret = set_log_level(config, v);
}
+ }
else if (!strncasecmp(key, FLB_CONF_STR_PARSERS_FILE, 32)) {
#ifdef FLB_HAVE_REGEX
tmp = flb_env_var_translate(config->env, v);
