Developer guide

Deep dive into ArgusLogs.core

Developer guide for ArgusLogs—the production debugging and observability platform for .NET applications.

Tutorials are hands-on walkthroughs (prerequisites, install, configuration, code, expected result, explanation, then next steps). Official reference stays in documentation — this is not a full docs clone.

Section 3 of 6 ArgusLogs.core

Service registration

ArgusLogs provides multiple extension methods under the ArgusLogs namespace to integrate with the ASP.NET Core dependency injection container. Here is why you should use each and how they function:

builder.Services.AddArgusLogsLogging(IConfiguration, Action<ArgusLogsOptions>?)

Why

Recommended registration method. Binds settings from the "ArgusLogs" section in appsettings.json and lets you override them with a fluent delegate.

How

Reads options from IConfiguration, initializes the centralized LogManager, registers ArgusLogsOptions as a singleton, and reflection-loads submodules such as ArgusLogs.DatabaseTracker.

builder.Services.AddArgusLogsLogging(Action<ArgusLogsOptions>?)

Why

Ideal when configuration comes entirely from environment variables, code, or external stores — bypassing appsettings.json binding.

How

Initializes default options and passes them directly to your configuration delegate for customization.

builder.Services.AddArgusLogs(IConfiguration) / AddArgusLogs(Action<ArgusLogsOptions>)

Why

Lightweight registration aliases for console apps, desktop projects, or non-web workloads where full middleware pipeline tracking isn’t needed but logging/correlation still is.

How

Registers core logging and correlation without requiring the HTTP middleware pipeline.

app.UseArgusLogs()

Why

Places ArgusLogsMiddleware in the request-handling pipeline.

How

Intercepts incoming HTTP requests and response streams, extracts context attributes, logs latency, and correlates database query tracking or outgoing HTTP tracing.