Getting Started

Installing and Setting up WatchDog.

Installation

Install via .NET CLI

dotnet add package WatchDog.NET --version 1.4.6

Install via Package Manager

Install-Package WatchDog.NET --version 1.4.6

Usage

To enable WatchDog to listen for requests, use the WatchDog middleware provided by WatchDog.

Add WatchDog Namespace

using WatchDog;

Register WatchDog

services.AddWatchDogServices();

For .NET Core 3.1, this should be under the ConfigureService() in your Startup.cs file.

For .NET 5 and above, this should be in your Program.cs file.

Add WatchDog middleware in the HTTP request pipeline

This authentication information (Username and Password) will be used to access the log viewer.

app.UseWatchDog(opt => 
{ 
   opt.WatchPageUsername = "YOUR USERNAME GOES HERE"; 
   opt.WatchPagePassword = "YOUR PASSWORD GOES HERE"; 
 });

NOTE If your project uses authentication, then app.UseWatchDog(); should come after app.UseRouting(), app.UseAuthentication(), app.UseAuthorization(), in that order

Last updated

Was this helpful?