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>?)
Recommended registration method. Binds settings from the "ArgusLogs" section in appsettings.json and lets you override them with a fluent delegate.
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>?)
Ideal when configuration comes entirely from environment variables, code, or external stores — bypassing appsettings.json binding.
Initializes default options and passes them directly to your configuration delegate for customization.
builder.Services.AddArgusLogs(IConfiguration) / AddArgusLogs(Action<ArgusLogsOptions>)
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.
Registers core logging and correlation without requiring the HTTP middleware pipeline.
app.UseArgusLogs()
Places ArgusLogsMiddleware in the request-handling pipeline.
Intercepts incoming HTTP requests and response streams, extracts context attributes, logs latency, and correlates database query tracking or outgoing HTTP tracing.