added loaders tests

This commit is contained in:
gabime
2019-12-21 19:25:54 +02:00
parent 28e334c728
commit e13e978af4
6 changed files with 56 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ namespace spdlog {
namespace cfg {
namespace argv {
// search for SPDLOG_LEVEL= in the args and use it to init the levels
void load_levels(int args, char *argv[])
void load_levels(int args, const char *argv[])
{
const std::string spdlog_level_prefix = "SPDLOG_LEVEL=";
for (int i = 1; i < args; i++)

View File

@@ -11,8 +11,7 @@ namespace spdlog {
namespace cfg {
class log_levels
{
using levels_map = std::unordered_map<std::string, spdlog::level::level_enum>;
levels_map levels_;
std::unordered_map<std::string, spdlog::level::level_enum> levels_;
spdlog::level::level_enum default_level_ = level::info;
public: