.NET logging to Notepad
Find a file
2020-05-23 23:55:51 +10:00
Notepad.Extensions.Logging Introduce code analysis, clean up code to comply 2020-05-23 23:55:51 +10:00
Notepad.Extensions.Logging.FunctionalTest Introduce code analysis, clean up code to comply 2020-05-23 23:55:51 +10:00
.editorconfig Introduce code analysis, clean up code to comply 2020-05-23 23:55:51 +10:00
.gitignore Initial version 2020-05-21 10:35:58 +10:00
LICENSE.md Add licence and package metadata 2020-05-21 10:46:10 +10:00
Notepad.Extensions.Logging.sln Introduce code analysis, clean up code to comply 2020-05-23 23:55:51 +10:00
README.md Update README.md 2020-05-21 13:51:52 +10:00

Notepad.Extensions.Logging

NuGet

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:
// 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
}
  1. Open a new Notepad window.
  2. Run your application.

Source Material

Inspired by this tweet: