Skip to content

Commit

Permalink
Merge pull request #173 from erlingrj/cpp-logging
Browse files Browse the repository at this point in the history
Update Cpp docs on logging
  • Loading branch information
cmnrd authored Oct 14, 2023
2 parents dd3c480 + 38d2aa0 commit cfa2a43
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2771,15 +2771,16 @@ The reactor-cpp library provides logging utilities in [logging.hh](https://githu

In particular, reactor-cpp provides the following logging interfaces:

- `reactor::Debug()`: for verbose debug messages
- `reactor::Info()`: for info messages of general interest, info is the default severity level
- `reactor::Warning()`: for warning messages
- `reactor::Error()`: for errors
- `reactor::log::Debug()`: for verbose debug messages
- `reactor::log::Info()`: for info messages of general interest, info is the default severity level
- `reactor::log::Warning()`: for warning messages
- `reactor::log::Error()`: for errors

These utilities can be used analogues to `std::cout`. For instance:

```cpp
reactor::Info() << "Hello World! It is " << get_physical_time();

```lf-cpp
reactor::log::Info() << "Hello World! It is " << get_physical_time();
```

Note that unlike `std::cout` the new line delimiter is automatically added to the end of the message.
Expand Down

0 comments on commit cfa2a43

Please sign in to comment.