Setup

Configure ArgusLogs

Set license key via configuration, register sinks, configure ArgusLogs.TieredStorage, and enable ArgusLogs.UI with AddArgus() / UseArgusUI() for the /argus-logs viewer.

Guide 3 of 11 Configure ArgusLogs

License key

Set ArgusLogsKey in appsettings.json or environment variables. Generate a key from arguslogs.com after creating an account.

JSON
{
  "ArgusLogsKey": "ARGUS-LIC-YOUR-KEY"
}

TieredStorage (for ArgusLogs.UI)

ArgusLogs.UI reads from TieredStorage. Configure SQLite hot storage and archive paths inside AddArgus(). Tune RetentionDays and BatchSize for your volume.

C#
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;
        });
});

ArgusLogs.UI middleware

Call UseArgusUI() after UseArgus(). Set RoutePrefix (default /argus-logs) and DocumentTitle. Secure the route in production—see troubleshooting if the UI returns 401.

C#
app.UseArgus();
app.UseArgusUI(options =>
{
    options.RoutePrefix = "/argus-logs";
    options.DocumentTitle = "My App — Argus Diagnostics";
});

Related resources