1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1592, support ff_log_level and default to warning

This commit is contained in:
winlin 2020-02-05 12:32:15 +08:00
parent 2fa151726b
commit c50c51889a
7 changed files with 46 additions and 11 deletions

View file

@ -3487,6 +3487,7 @@ srs_error_t SrsConfig::check_normal_config()
&& n != "http_api" && n != "stats" && n != "vhost" && n != "pithy_print_ms"
&& n != "http_server" && n != "stream_caster"
&& n != "utc_time" && n != "work_dir" && n != "asprocess"
&& n != "ff_log_level"
) {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
}
@ -5782,6 +5783,18 @@ string SrsConfig::get_ff_log_dir()
return conf->arg0();
}
string SrsConfig::get_ff_log_level()
{
static string DEFAULT = "warning";
SrsConfDirective* conf = root->get("ff_log_level");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return conf->arg0();
}
SrsConfDirective* SrsConfig::get_dash(string vhost)
{
SrsConfDirective* conf = get_vhost(vhost);