MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / GetLogFile

Method GetLogFile

lib/mdflib/mdfviewer/src/util/logconfig.cpp:172–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172std::string LogConfig::GetLogFile(const std::string &logger_name) const {
173 const auto itr1 = log_chain_.find(logger_name);
174 if (itr1 != log_chain_.cend()) {
175 return itr1->second->Filename();
176 }
177 // No default logger found. Do recover user mistake.
178 for (const auto &itr2 : log_chain_) {
179 if (itr2.second->HasLogFile()) {
180 return itr2.second->Filename();
181 }
182 }
183 return {};
184}
185
186void LogConfig::Type(LogType log_type) { log_type_ = log_type; }
187LogType LogConfig::Type() const { return log_type_; }

Callers 11

SetUpTestSuiteMethod · 0.80
TEST_FFunction · 0.80
SetUpTestSuiteMethod · 0.80
SetUpTestSuiteMethod · 0.80
SetUpTestSuiteMethod · 0.80
SetUpTestSuiteMethod · 0.80
SetUpTestSuiteMethod · 0.80
SetUpTestSuiteMethod · 0.80
OnInitMethod · 0.80
OnOpenLogFileMethod · 0.80
OnUpdateOpenLogFileMethod · 0.80

Calls 4

findMethod · 0.80
cendMethod · 0.80
FilenameMethod · 0.45
HasLogFileMethod · 0.45

Tested by 8

SetUpTestSuiteMethod · 0.64
TEST_FFunction · 0.64
SetUpTestSuiteMethod · 0.64
SetUpTestSuiteMethod · 0.64
SetUpTestSuiteMethod · 0.64
SetUpTestSuiteMethod · 0.64
SetUpTestSuiteMethod · 0.64
SetUpTestSuiteMethod · 0.64