From f293b6f25653dd0ddbfecee4c4a7b6aea8ee8b2e Mon Sep 17 00:00:00 2001 From: Yaakov Date: Thu, 21 May 2020 13:51:23 +1000 Subject: [PATCH] Add instructions --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index c51699d..9855b4d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,29 @@ This is a library for .NET / .NET Core to log your program's output to a handy Notepad window! +## Installation + +To use: + +1. Add a package reference to Notepad.Extensions.Logging +2. In `Startup.cs`, call `AddNotepad()`, like so: + +```csharp +// This method gets called by the runtime. Use this method to add services to the container. +public void ConfigureServices(IServiceCollection services) +{ + services.AddControllersWithViews(); + + // ... + + services.AddLogging(lb => lb.AddNotepad()); // This is where the magic happens +} +``` + +3. Open a new Notepad window + +## Source Material + Inspired by [this tweet](https://twitter.com/steveklabnik/status/1263190719721766918): ![](https://pbs.twimg.com/media/EYfBQ5cXsAEcu2e?format=jpg&name=orig)