Adding a logv2::LogComponent::kTest broke the `logComponentV1toV2` for the new logv2-only "test" component. The parse in setParameter generates logger::LogComponent. We shouldn't have to keep logging::LogComponent and logv2::LogComponent in sync. We can convert everything to logv2 and get rid of logComponentV1toV2.
The jstests/core/set_param1.js breaks specifically from this effect.
From src/mongo/db/commands/parameters.cpp ,
using logger::LogComponentSetting;
using logger::parseLogComponentSettings;
using logv2::LogComponent;
using logv2::LogSeverity;
getParameter, which only uses direct properties of logv2::LogComponent, is getting correct logv2 settings.
But setParameter, which calls logger::parseLogComponentSettings, is going to use the log v1 parser, which can only generate logger::LogComponent settings, and will not be able to set a kTest. Furthermore, it perfoms v1 to v2 conversion by casts which only use the enum numeric codes, so we aren't really regression-checked against misalignments between v1 and v2 LogComponent and LogSeverity enums.
I recommend unifying the v1 and v2 enums, and getting rid of the V1toV2 helpers in src/mongo/logger/log_version_util.h
- split to
-
SERVER-47697 Make logger:: typedefs to logv2::LogSeverity, logv2::LogComponent, etc
- Closed
-
SERVER-47698 LogSeverity constexpr
- Closed
-
SERVER-47735 Convert all code to use `logv2` headers and names
- Closed
-
SERVER-47736 Bring LogSeverityLimiter from logger/ to logv2/
- Closed