
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
WatchDog is a Realtime HTTP (Request & Response) and Exception logger and viewer for ASP.Net Core Web Apps and APIs. It allows developers log and view http requests made to their web application and also exception caught during runtime in their web applications in Realtime.
It leverages on LiteDb
a Serverless MongoDB-like database with no configuration and SignalR
for real-time monitoring.
Install via .NET CLI
dotnet add package WatchDog.NET --version 1.1.0
Install via Package Manager
Install-Package WatchDog.NET --version 1.1.0
To enable WatchDog to listen for requests, use the WatchDog middleware provided by WatchDog.
Add WatchDog Namespace in Startup.cs
using WatchDog;
Startup.cs
under ConfigureService()
services.AddWatchDogServices();
Optional
This clears the logs after a specific duration.
services.AddWatchDogServices(opt =>
{
opt.IsAutoClear = true;
});
NOTE When
IsAutoClear = true
Default Schedule Time is set to Weekly, override the settings like below:
services.AddWatchDogServices(opt =>
{
opt.IsAutoClear = true;
opt.ClearTimeSchedule = WatchDogAutoClearScheduleEnum.Monthly;
});
Startup.cs
under Configure()
NOTE Add Authentication option like below:
Important
This authentication information (Username and Password) will be used to access the log viewer.
app.UseWatchDog(opt =>
{
opt.WatchPageUsername = "admin";
opt.WatchPagePassword = "Qwerty@123";
});
Optional
List of routes, paths or specific strings to be ignored should be a comma separated string like below.
app.UseWatchDog(opt =>
{
opt.WatchPageUsername = "admin";
opt.WatchPagePassword = "Qwerty@123";
opt.Blacklist = "Test/testPost, weatherforecast";
});
Optional
This is used to log in-app exceptions that occur during a particular HTTP request.
NOTE Add Exception Logger before the main WatchDog Middleware
app.UseWatchDogExceptionLogger();
app.UseWatchDog(opt =>
{
opt.WatchPageUsername = "admin";
opt.WatchPagePassword = "Qwerty@123";
opt.Blacklist = "Test/testPost, weatherforecast";
});
Start your server and head to /watchdog
to view the logs.
Example: https://myserver.com/watchdog or https://localhost:[your port]/watchdog
Still confused? Check out the implementation in the WatchDogCompleteTestAPI folder
Feel like something is missing? Fork the repo and send a PR.
Encountered a bug? Fork the repo and send a PR.
Alternatively, open an issue and we'll get to it as soon as we can.
FAQs
Unknown package
We found that auth.watchdog.net demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.