Setup

Getting started with ArgusLogs

Install ArgusLogs and ArgusLogs.DataAnnotation from NuGet, register services in Program.cs, call UseArgus(), and optionally mount ArgusLogs.UI at /argus-logs.

Guide 1 of 11 Getting started with ArgusLogs

Generate a license key

Quick-start licenses for local development and production. No account, domain, or IP registration — valid until 1 January 2028 on any host. Online verification runs inside ArgusLogs.core automatically.

  • No login
  • Any host
  • Until Jan 2028
  • Online verify

1. Install NuGet packages

Add the published packages from nuget.org. Current versions are pre-release (1.0.11-alpha.2608292142) — not a generally available stable 1.0. Versions must match across ArgusLogs.* packages:

Shell
dotnet add package ArgusLogs --version 1.0.11-alpha.2608292142
dotnet add package ArgusLogs.DataAnnotation --version 1.0.11-alpha.2608292142

2. Configure appsettings.json

Set your license key and project metadata. Generate a free key at /get-license — no account required for Development and Production generator keys.

JSON
{
  "ArgusLogsKey": "ARGUS-LIC-YOUR-KEY",
  "Logging": {
    "LogLevel": {
      "Default": "Information"
    }
  }
}

3. Wire Program.cs

Register ArgusLogs logging and enable the middleware pipeline early so HTTP and woven [LogMethod] telemetry is captured.

C#
using ArgusLogs;
using ArgusLogs.DataAnnotation;

builder.Services.AddArgus(options =>
{
    options.SetLicense(builder.Configuration["ArgusLogsKey"] ?? "")
        .WithLogFile("logs/Argus")
        .WithLogFileNameFormat("yyyyMMdd")
        .WithConsoleOutput();
}).AddArgusDataAnnotation();

var app = builder.Build();

app.UseArgus();
app.MapControllers();
app.Run();

4. Optional — ArgusLogs.UI

ArgusLogs.UI is an embedded diagnostics dashboard served from your ASP.NET Core app (default route /argus-logs). It reads from ArgusLogs.TieredStorage for fast search, trace drill-down, and SQL/HTTP inspection. Install the UI packages alongside ArgusLogs core:

Shell
dotnet add package ArgusLogs.TieredStorage --version 1.0.11-alpha.2608292142
dotnet add package ArgusLogs.UI --version 1.0.11-alpha.2608292142

5. Wire ArgusLogs.UI

Enable TieredStorage in AddArgus(), then call UseArgusUI() after UseArgus(). See the ArgusLogs.UI doc and the live dashboard walkthrough for full options and screenshots.

C#
using ArgusLogs;
using ArgusLogs.UI;

builder.Services.AddArgus(options =>
{
    options.SetLicense(builder.Configuration["ArgusLogsKey"] ?? "")
        .WithTieredStorage(opt =>
        {
            opt.SqliteConnectionString = "Data Source=logs/argus_hot.db;Cache=Shared";
            opt.ArchiveDirectory = "logs/archives";
            opt.RetentionDays = 7;
        });
});

var app = builder.Build();

app.UseArgus();
app.UseArgusUI(options => options.RoutePrefix = "/argus-logs");

Next steps

Read the ArgusLogs.UI guide, installation and configuration docs, follow the developer tutorial, and review best practices for TieredStorage retention.

Related resources