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

@ -888,6 +888,11 @@ VOID TEST(ConfigMainTest, CheckConf_ff_log_dir)
MockSrsConfig conf;
HELPER_ASSERT_FAILED(conf.parse(_MIN_OK_CONF "ff_log_dirs ./objs;"));
}
if (true) {
MockSrsConfig conf;
HELPER_ASSERT_FAILED(conf.parse(_MIN_OK_CONF "ff_log_levels info;"));
}
}
VOID TEST(ConfigMainTest, CheckConf_srs_log_level)
@ -3503,11 +3508,12 @@ VOID TEST(ConfigMainTest, CheckVhostConfig5)
if (true) {
MockSrsConfig conf;
HELPER_ASSERT_SUCCESS(conf.parse(_MIN_OK_CONF "srs_log_tank xxx;srs_log_level xxx2;srs_log_file xxx3;ff_log_dir xxx4;"));
HELPER_ASSERT_SUCCESS(conf.parse(_MIN_OK_CONF "srs_log_tank xxx;srs_log_level xxx2;srs_log_file xxx3;ff_log_dir xxx4; ff_log_level xxx5;"));
EXPECT_TRUE(conf.get_log_tank_file());
EXPECT_STREQ("xxx2", conf.get_log_level().c_str());
EXPECT_STREQ("xxx3", conf.get_log_file().c_str());
EXPECT_STREQ("xxx4", conf.get_ff_log_dir().c_str());
EXPECT_STREQ("xxx5", conf.get_ff_log_level().c_str());
EXPECT_TRUE(conf.get_ff_log_enabled());
}