Skip to content

Commit

Permalink
docs: use annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Jun 12, 2024
1 parent c4b63c7 commit 9ca8073
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ You can log a message by simply streaming things to `LOG`(<a particular
#include <glog/logging.h>

int main(int argc, char* argv[]) {
// Initialize Google’s logging library.
google::InitGoogleLogging(argv[0]);

// ...
LOG(INFO) << "Found " << num_cookies << " cookies";
google::InitGoogleLogging(argv[0]); // (1)!
LOG(INFO) << "Found " << num_cookies << " cookies"; // (2)!
}
```
1. Initialize the Google Logging Library
2. Log a message with informational severity
The library can be installed using various [package managers](packages.md) or
compiled [from source](build.md). For a detailed overview of glog features and
their usage, please refer to the [user guide](logging.md).
Expand Down
6 changes: 4 additions & 2 deletions docs/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,13 @@ used as follows:

``` cpp
if (VLOG_IS_ON(2)) {
// do some logging preparation and logging
// that can’t be accomplished with just VLOG(2) << ...;
// (1)
}
```

1. Here we can perform some logging preparation and logging that can’t be
accomplished with just `#!cpp VLOG(2) << "message ...";`

Verbose level condition macros `VLOG_IF`, `VLOG_EVERY_N` and `VLOG_IF_EVERY_N`
behave analogous to `LOG_IF`, `LOG_EVERY_N`, `LOG_IF_EVERY_N`, but accept a
numeric verbosity level as opposed to a severity level.
Expand Down

0 comments on commit 9ca8073

Please sign in to comment.