Skip to content

Commit

Permalink
Use the correct namespace to call shutDownLogging() (#353)
Browse files Browse the repository at this point in the history
This commit is to align the example source code in README with the source code.
  • Loading branch information
mkilivan authored May 31, 2020
1 parent 751330b commit 639bfd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ auto sinkHandle = logworker->addSink(std::make_unique<CustomSink>(),
# Code Examples
Example usage where a custom sink is added. A function is called though the sink handler to the actual sink object.
```
```cpp
// main.cpp
#include <g3log/g3log.hpp>
#include <g3log/logworker.hpp>
Expand All @@ -145,12 +145,12 @@ int main(int argc, char**argv) {
std::future<void> received = sinkHandle->call(&CustomSink::Foo,
param1, param2);
// If the LogWorker is initialized then at scope exit the g3::shutDownLogging() will be called.
// If the LogWorker is initialized then at scope exit the g3::internal::shutDownLogging() will be called.
// This is important since it protects from LOG calls from static or other entities that will go out of
// scope at a later time.
//
// It can also be called manually:
g3::shutDownLogging();
g3::internal::shutDownLogging();
}
Expand All @@ -166,7 +166,7 @@ void SomeFunction() {
```

Example usage where a the default file logger is used **and** a custom sink is added
```
```cpp
// main.cpp
#include <g3log/g3log.hpp>
#include <g3log/logworker.hpp>
Expand Down

0 comments on commit 639bfd7

Please sign in to comment.