diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2022-05-04 22:21:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-04 23:17:39 +0000 |
commit | 1634edc01f2fc41d1a4e61f3802c5cec90e0e793 (patch) | |
tree | d024d99b723c5055ff6fe527ffa706ac2a8912b8 /docs | |
parent | 25c0fbade9ec93a3c5458fc5c7d2481adad064c7 (diff) | |
download | mongo-1634edc01f2fc41d1a4e61f3802c5cec90e0e793.tar.gz |
SERVER-52604 normalize log.h inclusion semantics
Diffstat (limited to 'docs')
-rw-r--r-- | docs/logging.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/logging.md b/docs/logging.md index 388abfdaae6..f2a4145954b 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -148,8 +148,11 @@ The log system is made available with the following header: #include "mongo/logv2/log.h" -To be able to include it a default log component needs to be defined in the cpp -file before including `log.h`: +The macro `MONGO_LOGV2_DEFAULT_COMPONENT` is expanded by all logging macros. +This configuration macro must expand at their point of use to a `LogComponent` +expression, which is implicitly attached to the emitted message. It is +conventionally defined near the top of a `.cpp` file before any logging macros +are invoked. Example: #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault |