MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / setToDefault

Method setToDefault

src/thundersvm/util/log.cpp:277–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275 }
276
277 void Configurations::setToDefault(void) {
278 setGlobally(ConfigurationType::Enabled, std::string("true"), true);
279#if !defined(ELPP_NO_DEFAULT_LOG_FILE)
280 setGlobally(ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile), true);
281#else
282 ELPP_UNUSED(base::consts::kDefaultLogFile);
283#endif // !defined(ELPP_NO_DEFAULT_LOG_FILE)
284#if defined(ELPP_NO_LOG_TO_FILE)
285 setGlobally(ConfigurationType::ToFile, std::string("false"), true);
286#else
287 setGlobally(ConfigurationType::ToFile, std::string("true"), true);
288#endif // defined(ELPP_NO_LOG_TO_FILE)
289 setGlobally(ConfigurationType::ToStandardOutput, std::string("true"), true);
290 setGlobally(ConfigurationType::SubsecondPrecision, std::string("3"), true);
291 setGlobally(ConfigurationType::PerformanceTracking, std::string("true"), true);
292 setGlobally(ConfigurationType::MaxLogFileSize, std::string("0"), true);
293 setGlobally(ConfigurationType::LogFlushThreshold, std::string("0"), true);
294
295 setGlobally(ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"), true);
296 set(Level::Debug, ConfigurationType::Format,
297 std::string("%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg"));
298 // INFO and WARNING are set to default by Level::Global
299 set(Level::Error, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"));
300 set(Level::Fatal, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg"));
301 set(Level::Verbose, ConfigurationType::Format, std::string("%datetime %level-%vlevel [%logger] %msg"));
302 set(Level::Trace, ConfigurationType::Format, std::string("%datetime %level [%logger] [%func] [%loc] %msg"));
303 }
304
305 void Configurations::setRemainingToDefault(void) {
306 base::threading::ScopedLock scopedLock(lock());

Callers 1

RegisteredLoggersMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected