| 2070 | } |
| 2071 | |
| 2072 | void Storage::setApplicationArguments(int argc, char** argv) { |
| 2073 | m_commandLineArgs.setArgs(argc, argv); |
| 2074 | m_vRegistry->setFromArgs(commandLineArgs()); |
| 2075 | // default log file |
| 2076 | #if !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) |
| 2077 | if (m_commandLineArgs.hasParamWithValue(base::consts::kDefaultLogFileParam)) { |
| 2078 | Configurations c; |
| 2079 | c.setGlobally(ConfigurationType::Filename, |
| 2080 | std::string(m_commandLineArgs.getParamValue(base::consts::kDefaultLogFileParam))); |
| 2081 | registeredLoggers()->setDefaultConfigurations(c); |
| 2082 | for (base::RegisteredLoggers::iterator it = registeredLoggers()->begin(); |
| 2083 | it != registeredLoggers()->end(); ++it) { |
| 2084 | it->second->configure(c); |
| 2085 | } |
| 2086 | } |
| 2087 | #endif // !defined(ELPP_DISABLE_LOG_FILE_FROM_ARG) |
| 2088 | #if defined(ELPP_LOGGING_FLAGS_FROM_ARG) |
| 2089 | if (m_commandLineArgs.hasParamWithValue(base::consts::kLoggingFlagsParam)) { |
| 2090 | int userInput = atoi(m_commandLineArgs.getParamValue(base::consts::kLoggingFlagsParam)); |
| 2091 | if (ELPP_DEFAULT_LOGGING_FLAGS == 0x0) { |
| 2092 | m_flags = userInput; |
| 2093 | } else { |
| 2094 | base::utils::addFlag<base::type::EnumType>(userInput, &m_flags); |
| 2095 | } |
| 2096 | } |
| 2097 | #endif // defined(ELPP_LOGGING_FLAGS_FROM_ARG) |
| 2098 | } |
| 2099 | |
| 2100 | // DefaultLogDispatchCallback |
| 2101 |
nothing calls this directly
no test coverage detected