| 303 | } |
| 304 | |
| 305 | void Configurations::setRemainingToDefault(void) { |
| 306 | base::threading::ScopedLock scopedLock(lock()); |
| 307 | #if defined(ELPP_NO_LOG_TO_FILE) |
| 308 | unsafeSetIfNotExist(Level::Global, ConfigurationType::Enabled, std::string("false")); |
| 309 | #else |
| 310 | unsafeSetIfNotExist(Level::Global, ConfigurationType::Enabled, std::string("true")); |
| 311 | #endif // defined(ELPP_NO_LOG_TO_FILE) |
| 312 | #if !defined(ELPP_NO_DEFAULT_LOG_FILE) |
| 313 | unsafeSetIfNotExist(Level::Global, ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile)); |
| 314 | #endif // !defined(ELPP_NO_DEFAULT_LOG_FILE) |
| 315 | unsafeSetIfNotExist(Level::Global, ConfigurationType::ToStandardOutput, std::string("true")); |
| 316 | unsafeSetIfNotExist(Level::Global, ConfigurationType::SubsecondPrecision, std::string("3")); |
| 317 | unsafeSetIfNotExist(Level::Global, ConfigurationType::PerformanceTracking, std::string("true")); |
| 318 | unsafeSetIfNotExist(Level::Global, ConfigurationType::MaxLogFileSize, std::string("0")); |
| 319 | unsafeSetIfNotExist(Level::Global, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); |
| 320 | unsafeSetIfNotExist(Level::Debug, ConfigurationType::Format, |
| 321 | std::string("%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg")); |
| 322 | // INFO and WARNING are set to default by Level::Global |
| 323 | unsafeSetIfNotExist(Level::Error, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); |
| 324 | unsafeSetIfNotExist(Level::Fatal, ConfigurationType::Format, std::string("%datetime %level [%logger] %msg")); |
| 325 | unsafeSetIfNotExist(Level::Verbose, ConfigurationType::Format, std::string("%datetime %level-%vlevel [%logger] %msg")); |
| 326 | unsafeSetIfNotExist(Level::Trace, ConfigurationType::Format, |
| 327 | std::string("%datetime %level [%logger] [%func] [%loc] %msg")); |
| 328 | } |
| 329 | |
| 330 | bool Configurations::Parser::parseFromFile(const std::string& configurationFile, Configurations* sender, |
| 331 | Configurations* base) { |
nothing calls this directly
no outgoing calls
no test coverage detected