Skip to content

Commit

Permalink
Add link to an an example of bootstrapping a Vapor 4 application
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanebelanger authored Mar 10, 2020
1 parent c468ce7 commit 3f48cf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ In your target's dependencies add `"StackdriverLogging"` e.g. like this:
```

## Bootstrapping
**Check out [bootstrapping Stackdriver logging for a Vapor 4 application](https://gist.github.com/jordanebelanger/4307bf34b4ff256c9c8ec52d94db905b) for a practical example using Vapor 4.**

A factory is used to instantiate `StackdriverLogHandler` instances. Before bootstrapping your `LoggingSystem`, you must first call the `StackdriverLogHandlerFactory.prepare(:)` function with a `StackdriverLoggingConfiguration`, an NIO `NonBlockingFileIO` to write the logs asynchronously and an `EventLoopGroup` used to process new log entries in the background.

You are responsible for gracefully shutting down the NIO dependencies used to prepare the `StackdriverLogHandlerFactory`.
Expand Down

0 comments on commit 3f48cf9

Please sign in to comment.