MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / SetLogLevel

Method SetLogLevel

libi2pd/Log.cpp:129–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 }
128
129 void Log::SetLogLevel (const std::string& level_) {
130 std::string level=str_tolower(level_);
131 if (level == "none") { m_MinLevel = eLogNone; }
132 else if (level == "critical") { m_MinLevel = eLogCritical; }
133 else if (level == "error") { m_MinLevel = eLogError; }
134 else if (level == "warn") { m_MinLevel = eLogWarning; }
135 else if (level == "info") { m_MinLevel = eLogInfo; }
136 else if (level == "debug") { m_MinLevel = eLogDebug; }
137 else {
138 LogPrint(eLogCritical, "Log: Unknown loglevel: ", level);
139 return;
140 }
141 LogPrint(eLogInfo, "Log: Logging level set to ", level);
142 }
143
144 const char * Log::TimeAsString(std::time_t t) {
145 struct tm caltime;

Callers 2

SetLogLevelFunction · 0.80
initMethod · 0.80

Calls 2

str_tolowerFunction · 0.85
LogPrintFunction · 0.85

Tested by

no test coverage detected