[SERVER-57680] Use namespace instead of nss for naming log attributes Created: 14/Jun/21  Updated: 29/Oct/23  Resolved: 09/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.0-rc1
Fix Version/s: 5.1.0

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Sanika Phanse (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-47594 Create LOG(v2) helpers for collection... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-11-01
Participants:

 Description   

To be consistent with the rule:

https://github.com/mongodb/mongo/blob/acc6e374f8c7d43e52815fd8c1865619d7dd893a/src/mongo/logv2/README.md#use-certain-specific-terms-whenever-possible

 

Examples of places where this was not followed:

https://github.com/mongodb/mongo/blob/acc6e374f8c7d43e52815fd8c1865619d7dd893a/src/mongo/db/repl/oplog.cpp#L159

https://github.com/mongodb/mongo/blob/acc6e374f8c7d43e52815fd8c1865619d7dd893a/src/mongo/db/s/config/sharding_catalog_manager.cpp#L924



 Comments   
Comment by Githook User [ 08/Nov/21 ]

Author:

{'name': 'Sanika Phanse', 'email': 'sanika.phanse@mongodb.com', 'username': 'sphanse99'}

Message: SERVER-57680 Use namespace instead of nss for naming log attributes
Branch: master
https://github.com/mongodb/mongo/commit/9a43c0a3d22c535e916ebe3b208ea86a4b3ce4de

Comment by Daniel Gottlieb (Inactive) [ 15/Jun/21 ]

FWIW, I think when one has a NamespaceString type, that can be logged as logAttrs(nss) and it will be assigned the appropriate name. E.g:

    LOGV2_FATAL_NOTRACE(5114200,
                        "Applying importCollection is not supported with MongoDB Community "
                        "Edition, please use MongoDB Enterprise Edition",
                        "importUUID"_attr = importUUID,
                        logAttrs(nss),
<snip>

Generated at Thu Feb 08 05:42:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.