100 {
101 el::Configurations conf = *el::Loggers::defaultConfigurations();
102
103 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "false");
104 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "false");
105 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "false");
106 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "false");
107 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "false");
108 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "false");
109
110 switch (level) {
111 case 6:
112 conf.set(el::Level::Trace, el::ConfigurationType::Enabled, "true");
113 [[fallthrough]];
114 case 5:
115 conf.set(el::Level::Debug, el::ConfigurationType::Enabled, "true");
116 [[fallthrough]];
117 case 4:
118 conf.set(el::Level::Info, el::ConfigurationType::Enabled, "true");
119 [[fallthrough]];
120 case 3:
121 conf.set(el::Level::Warning, el::ConfigurationType::Enabled, "true");
122 [[fallthrough]];
123 case 2:
124 conf.set(el::Level::Error, el::ConfigurationType::Enabled, "true");
125 [[fallthrough]];
126 case 1:
127 conf.set(el::Level::Fatal, el::ConfigurationType::Enabled, "true");
128 [[fallthrough]];
129 case 0:
130 [[fallthrough]];
131 default:;
132 }
133
134 el::Loggers::setDefaultConfigurations(conf, true);
135 }