Skip to main content

System Logs

Polygent ships with a built-in log viewer for diagnosing API and Agent behavior without leaving the browser. Logs are also written to disk under StoragePath/logs/. Permissions: settings.view to view; settings.manage to change retention/log-level overrides.

Where to Find It

Sidebar → Settings → System Logs.

Log Levels

Polygent uses standard .NET logging levels, in order of severity:

LevelUse
VerboseTrace-level diagnostics — extremely chatty, dev-only
DebugUseful diagnostics during development and bug reproduction
InformationNormal operational events (default)
WarningRecoverable issues, slow operations, non-fatal hook failures
ErrorOperations that failed and require attention
FatalProcess-stopping errors

Filter the log viewer by minimum level — selecting Warning shows Warning, Error, and Fatal entries.

Time Filters

FilterRange
Last HourPast 60 minutes
Last 5 HoursPast 5 hours
TodaySince midnight (server local time)
Last 5 DaysPast 5 days
AllNo time bound (paginated)

Search and Pagination

  • Free-text search runs over the rendered message and structured properties
  • Results are paginated; older entries fetch on demand as you scroll or page
  • Combining a level filter, a time filter, and a search term is the fastest path to a needle-in-the-haystack lookup

Log Sources

The viewer aggregates entries from:

  • API process — endpoints, services, real-time hub, background workers
  • Agent process(es) — session execution, slot deployment, heartbeat
  • Hooks — task output from every session lifecycle event (also visible in the session sidebar)
  • Workflow steps — task script output
  • Provider CLIs — stdout/stderr from each invocation, attributed to the originating session

File Layout

Logs on disk live under StoragePath/logs/ as structured JSON-lines files, written by two sinks:

  • A main sink capturing every event at or above the configured level
  • A separate error sink capturing only Error and Fatal events, for fast triage

Each sink rolls daily. The Session Agent and Deployment Agent write their own daily-rolling files in the same layout. The log viewer queries the same store, so anything visible in the UI is also on disk for offline analysis.

Configuring Log Levels

The runtime minimum level is controlled by a single setting, Logging:LogLevel:Default. It defaults to Information:

{
"Logging": {
"LogLevel": {
"Default": "Information"
}
}
}

Set it to Debug or Verbose for deep diagnostics, or Warning to quiet the logs, then restart the API to apply the change. Noisy framework namespaces are already suppressed to Warning internally, so only the Default value needs adjusting.

You can also set the level via an environment variable instead of editing the file:

Logging__LogLevel__Default="Debug"
note

Only the Default level is applied to the log files and viewer. Per-namespace entries (such as a custom Polygent or Microsoft.AspNetCore key) are ignored by the runtime, so changing them has no effect.

Retention

Daily-rolling files are kept for 30 days and capped at 100 MB per file; older files are pruned automatically. For longer-term retention or compliance archival, ship the logs/ directory to your own log store (e.g. a SIEM or object storage) before the 30-day window elapses.

See Also