From 847972f9b21b3a8213952512e287d1e4bff16801 Mon Sep 17 00:00:00 2001 From: Joshua Baergen Date: Thu, 16 Jun 2022 10:14:12 -0600 Subject: [PATCH] log: Make log_max_recent have an effect again. The log improvements in a747aeac13daf3dba43343120659e802cb569f6b unfortunately left log_max_recent broken because m_max_recent wasn't used anymore. Eliminate m_max_recent and set the capacity of the m_recent ring buffer when log_max_recent changes. In order to call set_capacity(), ConcreteEntry needed its move constructor set noexcept. I haven't followed the boost code all the way down but I suspect that setting the ring buffer capacity to anything less than 1 entry will probably cause problems, so restrict log_max_recent to >=1. Also fix a wrong variable used for printing the max new entries during "log dump". Signed-off-by: Joshua Baergen (cherry picked from commit 3d59ba1671e3e76326fb706a76b8d9638d782924) Conflicts: - file: src/common/options/global.yaml.in desc: file not exists in pacific - file: src/common/options.cc desc: added 'set_min' for log_max_recent --- src/common/options.cc | 1 + src/log/Entry.h | 2 +- src/log/Log.cc | 6 +++--- src/log/Log.h | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index c9cb4b8d75f4..d3f0166ffb18 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -597,6 +597,7 @@ std::vector