mirror of
https://github.com/yaakov-h/Notepad.Extensions.Logging.git
synced 2024-11-21 18:54:48 +00:00
.NET logging to Notepad
Notepad.Extensions.Logging | ||
Notepad.Extensions.Logging.FunctionalTest | ||
.editorconfig | ||
.gitignore | ||
LICENSE.md | ||
Notepad.Extensions.Logging.sln | ||
README.md |
Notepad.Extensions.Logging
This is a library for .NET / .NET Core to log your program's output to a handy Notepad window!
Installation
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.
Source Material
Inspired by this tweet: