-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Service Arch 2023-09-18
Rerun the tool from SERVER-52604.
See Slack announcement.
https://mongodb.slack.com/archives/C1MT4NHF0/p1694046326160709
Quoted here:
Hey all, quick memo (more of a reminder):
As you probably know, the #define MONGO_LOGV2_DEFAULT_COMPONENT is necessary in a server .cpp file that wants to use logging.
- The old rule was that this definition must appear before the #include block at the top of a .cpp file.
- The new rule is that this definition must appear after the #include block. A complete reversal!
This change happened about 16 months ago in SERVER-52604, which included a codebase sweep. However, since that sweep, 20+ instances of the old style have come in. These old-style definitions may not break anything immediately, but they make it impossible to LOGV2 from headers that they include, and could be trouble for a C++ modules rollout, or cause other subtle modularity problems.
I'm going to do another sweep of the codebase and fix these again (it's easy because I have a tool that does it), but I do want to get the word out.
Thx!
This is really just tracking the work to run the script again.
https://gist.github.com/BillyDonahue/48c2746b9a761e1d1ecc930486d83aa5
- is depended on by
-
SERVER-80434 CommandRegistry per Service
- Closed
- is related to
-
SERVER-52604 Log from anywhere (normalize MONGO_LOGV2_DEFAULT_COMPONENT)
- Closed