This is a library for .NET / .NET Core to log your program's output to a handy Notepad window!
To use:
- Add a package reference to
Notepad.Extensions.Logging
. - In
Startup.cs
, callAddNotepad()
, 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
}
- Open a new Notepad, Notepad++, or Notepad2 window.
- Run your application.
Inspired by this tweet: