SG SealGrid Athena Docs

Server Logging & Log Retention

Athena writes its own diagnostic log to disk on the server — a plain-text file you can open when you need to see exactly what the service did, when, and why. Settings → Logging is where an Admin controls how verbose that log is, where it is written, and how long old files are kept before they are cleaned up. This is the on-premises equivalent of tuning a System Center or PDQ server's own logging — no telemetry leaves your network; everything lands in a folder you choose on your own host.

This page is about the server's log files — the running Athena service. For a single agent's live log stream, see the Live Logs section on an Agent Details page and the Default Log Level in Agent Settings. For a security-focused record of who did what (logins, setting changes, deployments), see the tamper-aware Audit log, which is separate from the diagnostic log described here.

Where to find it#

Open Settings and choose the Logging tab. It is divided into three sections:

Reading and changing Logging settings both require the Admin role. The whole Settings area is Admin-only, and every save is written to the audit log (see Auditing).

Log levels#

The Log Levels section sets how verbose the server log is. There are two independent levels so you can turn up detail for Athena's own activity without drowning in low-level web-framework chatter:

SettingWhat it controlsDefault
Default Log Level
defaultLogLevel
The baseline verbosity for Athena's own log messages — the minimum severity that gets written to the file. Information
ASP.NET Core Log Level
aspNetCoreLogLevel
A separate level for the underlying web-server framework's messages. It is kept quieter by default so routine request handling doesn't bury Athena's own entries. Warning

Each level is chosen from a dropdown, from most to least detailed:

LevelWhen to use it
TraceExtremely detailed, message-by-message diagnostics. Use only for short, targeted troubleshooting — it produces a lot of output.
DebugDeveloper-level detail useful when investigating a specific problem.
InformationNormal operational messages. The recommended everyday setting for the default level.
WarningOnly unexpected situations that aren't yet errors. A good quiet baseline for the framework level.
ErrorFailures only.
CriticalSevere failures that may stop part of the service.
Verbosity vs. disk usage

Lower levels like Trace and Debug capture far more, which is invaluable while chasing an issue but fills the log directory quickly. A common pattern is to drop the Default Log Level to Debug while reproducing a problem, then return it to Information once you have what you need.

Log storage & retention#

The Log Storage section controls where the files live and how many are kept:

SettingWhat it doesDefaultRange
Log Directory
logDirectory
The folder on the server where log files are written. A relative path is resolved from the server's working directory; you can also give an absolute path. Logs Any path
Log Retention (days)
logRetentionDays
How many days of daily log files to keep. Older files beyond this window are removed automatically so the directory doesn't grow without bound. 30 1–365

Athena rolls the diagnostic log once per day. Each day's file is named athena-YYYYMMDD.log inside the log directory — for example athena-20260721.log — so files sort chronologically and are easy to pick out by date. The server keeps the most recent files and prunes the rest according to the retention window above.

Persisting logs in a container deployment

If you run the server in Docker, point the Log Directory at a path that is backed by a mounted volume so the files survive a container replacement. Mounting the log directory also lets your own host-side tooling read or ship the files without reaching into the container. See Installation and Configuration for volume mounts.

Logging changes need a restart

Log-level, directory, and retention changes are saved immediately, but the running service applies them on its next start. The console shows a reminder to this effect when you save. Plan a brief restart of the Athena server (for example during a maintenance window) for the new logging configuration to take full effect.

Using the log for troubleshooting#

When something on the server misbehaves — a failed startup, a certificate problem, a background job that didn't run — the diagnostic log is the first place to look. Open the most recent athena-YYYYMMDD.log in the configured Log Directory. Each line is timestamped and tagged with a severity such as INF, WRN, or ERR, and includes the component that produced it, so you can scan for the moment a problem started.

Roles#

Reading and changing Logging settings is restricted to Admin users — the entire Settings area, its REST endpoints, and the matching PowerShell cmdlets all require the Admin role. See Roles & Permissions.

REST API#

Logging settings are exposed under api/settings/logging. Both operations are Admin-only.

Method & pathPurpose
GET api/settings/loggingReturn the current logging settings.
PUT api/settings/loggingUpdate logging settings. The change is audited; some changes take effect only after the server restarts.
GET api/settingsReturn all settings groups at once (General, Security, Agent, Scheduler, Database, Logging).

A typical update body:

# Keep two weeks of logs and quiet the framework chatter
PUT api/settings/logging
{
  "defaultLogLevel": "Information",
  "aspNetCoreLogLevel": "Warning",
  "logDirectory": "Logs",
  "logRetentionDays": 14
}

Invalid values return 400; an unauthenticated call returns 401, and a non-Admin caller 403. A successful update returns a confirmation message.

PowerShell#

The PowerShell module reads and writes logging settings by category with Get-AthenaSettings and Set-AthenaSettings. Fetch the current object, change a field, and put it back:

# Inspect the current logging configuration
Get-AthenaSettings -Category Logging

# Fetch, tweak, and save back
$logging = Get-AthenaSettings -Category Logging
$logging.DefaultLogLevel  = "Debug"
$logging.LogRetentionDays = 14
Set-AthenaSettings -Category Logging -Settings $logging

# Preview a change first with -WhatIf
Set-AthenaSettings -Category Logging -Settings @{
  DefaultLogLevel  = "Information"
  LogRetentionDays = 30
} -WhatIf

Get-AthenaSettings accepts -Category General, Security, Agent, Scheduler, Database or Logging (omit it to get everything). Set-AthenaSettings supports -WhatIf / -Confirm so you can preview a change before applying it. All of these require an Admin session.

Configuration file#

Logging settings are stored in the server's appsettings.json under the Logging section, so you can also set them at install time before the console is even up. The keys map to the fields above:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    },
    "Directory": "Logs",
    "RetentionDays": 30
  }
}

Editing the file directly requires a restart to take effect, exactly as a change made in the console does. See Configuration for the full settings file.

Auditing#

Every save to Logging settings is recorded in the audit log with the Admin who made the change, so you have a record of when verbosity or retention was adjusted. If you forward audit events to a SIEM, those changes flow there too — see Audit Forwarding to SIEM.

Recommendations#