Skip to content

Commit

Permalink
fix "str is [], can't find level" error
Browse files Browse the repository at this point in the history
  • Loading branch information
findix authored and deemar committed Sep 9, 2024
1 parent f7e92a4 commit 9f46351
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ static int zlog_conf_build_with_file(zlog_conf_t * a_conf)
}
}

a_conf->level = zlog_level_list_atoi(a_conf->levels, a_conf->log_level);
if (a_conf->log_level[0] != '\0') {
a_conf->level = zlog_level_list_atoi(a_conf->levels, a_conf->log_level);
}

exit:
fclose(fp);
Expand Down

0 comments on commit 9f46351

Please sign in to comment.