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

Method allowed

src/thundersvm/util/log.cpp:1944–1962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1942 }
1943
1944 bool VRegistry::allowed(base::type::VerboseLevel vlevel, const char* file) {
1945 base::threading::ScopedLock scopedLock(lock());
1946 if (m_modules.empty() || file == nullptr) {
1947 return vlevel <= m_level;
1948 } else {
1949 char baseFilename[base::consts::kSourceFilenameMaxLength] = "";
1950 base::utils::File::buildBaseFilename(file, baseFilename);
1951 std::map<std::string, base::type::VerboseLevel>::iterator it = m_modules.begin();
1952 for (; it != m_modules.end(); ++it) {
1953 if (base::utils::Str::wildCardMatch(baseFilename, it->first.c_str())) {
1954 return vlevel <= it->second;
1955 }
1956 }
1957 if (base::utils::hasFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified, *m_pFlags)) {
1958 return true;
1959 }
1960 return false;
1961 }
1962 }
1963
1964 void VRegistry::setFromArgs(const base::utils::CommandLineArgs* commandLineArgs) {
1965 if (commandLineArgs->hasParam("-v") || commandLineArgs->hasParam("--verbose") ||

Callers 1

log_Method · 0.80

Calls 4

hasFlagFunction · 0.85
endMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected