mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
wip
This commit is contained in:
parent
1a1c37db7c
commit
de20255c71
@ -25,8 +25,7 @@ void syslog_example();
|
|||||||
|
|
||||||
int main(int args, char *argv[])
|
int main(int args, char *argv[])
|
||||||
{
|
{
|
||||||
|
spdlog::loaders::load_env();
|
||||||
//spdlog::loaders::load_env();
|
|
||||||
spdlog::loaders::load_argv(args, argv);
|
spdlog::loaders::load_argv(args, argv);
|
||||||
spdlog::info("HELLO INFO");
|
spdlog::info("HELLO INFO");
|
||||||
|
|
||||||
|
@ -55,3 +55,13 @@ TEST_CASE("argv4", "[loaders]")
|
|||||||
REQUIRE(l1->level() == spdlog::level::info);
|
REQUIRE(l1->level() == spdlog::level::info);
|
||||||
spdlog::drop(l1->name());
|
spdlog::drop(l1->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("argv5", "[loaders]")
|
||||||
|
{
|
||||||
|
const char *argv[] = {"ignore", "ignore", "SPDLOG_LEVEL=l1=warn,trace"};
|
||||||
|
load_argv(3, const_cast<char**>(argv));
|
||||||
|
auto l1 = spdlog::create<spdlog::sinks::test_sink_st>("l1");
|
||||||
|
REQUIRE(l1->level() == spdlog::level::warn);
|
||||||
|
REQUIRE(spdlog::default_logger()->level() == spdlog::level::trace);
|
||||||
|
spdlog::drop(l1->name());
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user