62 {
63 el::Configurations conf = *el::Loggers::defaultConfigurations();
64
65 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "false");
66 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "false");
67 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "false");
68 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "false");
69 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "false");
70 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "false");
71
72 switch (level) {
73 case 6:
74 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "true");
75 [[fallthrough]];
76 case 5:
77 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "true");
78 [[fallthrough]];
79 case 4:
80 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "true");
81 [[fallthrough]];
82 case 3:
83 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "true");
84 [[fallthrough]];
85 case 2:
86 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "true");
87 [[fallthrough]];
88 case 1:
89 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "true");
90 [[fallthrough]];
91 case 0:
92 [[fallthrough]];
93 default:;
94 }
95
96 el::Loggers::setDefaultConfigurations(conf, true);
97 }