84 {
85 el::Configurations conf = *el::Loggers::defaultConfigurations();
86
87 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "false");
88 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "false");
89 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "false");
90 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "false");
91 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "false");
92 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "false");
93
94 switch (level) {
95 case 6:
96 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "true");
97 [[fallthrough]];
98 case 5:
99 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "true");
100 [[fallthrough]];
101 case 4:
102 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "true");
103 [[fallthrough]];
104 case 3:
105 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "true");
106 [[fallthrough]];
107 case 2:
108 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "true");
109 [[fallthrough]];
110 case 1:
111 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "true");
112 [[fallthrough]];
113 case 0:
114 [[fallthrough]];
115 default:;
116 }
117
118 el::Loggers::setDefaultConfigurations(conf, true);
119 }