MCPcopy Create free account
hub / github.com/MITK/MITK / SetLogLimit

Method SetLogLimit

Modules/RESTAPI/src/mitkRestServer.cpp:540–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540void RestServer::SetLogLimit(std::optional<unsigned int> limit)
541{
542 std::lock_guard<std::mutex> lock(m_Mutex);
543 m_LogLimit = limit;
544
545 if (m_LogLimit.has_value() && m_RequestLog.size() > m_LogLimit.value())
546 {
547 while (m_RequestLog.size() > m_LogLimit.value())
548 {
549 m_RequestLog.pop_front();
550 }
551 ++m_RequestLogVersion;
552 }
553}
554
555std::optional<unsigned int> RestServer::GetLogLimit() const
556{

Callers 3

LogLimitCanBeSetMethod · 0.80
PerformOkMethod · 0.80

Calls 2

sizeMethod · 0.45
valueMethod · 0.45

Tested by 2

LogLimitCanBeSetMethod · 0.64