MaxVoidsPerElement

This commit is contained in:
Thomas Krijnen
2026-07-09 22:14:31 +02:00
parent 552576fcc3
commit 241b276de0
5 changed files with 109 additions and 5 deletions
+9
View File
@@ -290,6 +290,15 @@ std::string logger::get_log() {
return log_stream_.str();
}
std::size_t logger::count(const std::string& code) {
std::lock_guard<std::mutex> lock(mutex_);
std::size_t count = 0;
for (const auto& message : log_messages_) {
count += code == message.code;
}
return count;
}
void logger::clear() {
std::lock_guard<std::mutex> lock(mutex_);
log_stream_.str(std::string());