From 3f48cf9892fcef494e1bb092fe12aadcd1d745e4 Mon Sep 17 00:00:00 2001 From: Jordane Belanger Date: Tue, 10 Mar 2020 11:12:02 -0400 Subject: [PATCH] Add link to an an example of bootstrapping a Vapor 4 application --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e8f895b..d840415 100644 --- a/README.md +++ b/README.md @@ -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`.