* Add live server logs Spec Kit plan * Implement live server logs diagnostics module * Add server log sources and redaction hardening * Add diagnostics unit tests * Harden server log hub subscriptions * Secure server log hub permissions * Validate server log filter updates * Add diagnostics logger and source tests * Add diagnostics integration test project * Add multi-source diagnostics provider coverage * Broadcast server log source changes * Document diagnostics server log streaming * Add diagnostics sample host wiring * Record diagnostics validation results * Address server log PR feedback * Rename diagnostics module to server logs * Add server logs shell feature * Make server logs shell options bindable * Accept read wildcard for server logs * Align server logs authorization with API patterns * Update CShells structure and logging levels, add diagnostics module * Rename PostgreSql shell feature classes for consistency * Switch from Sqlite to PostgreSQL for workflow and identity persistence, add QuartzPostgreSql configuration * Refactor server logs into diagnostics structured logs (#7440) * Specify diagnostics structured logs refactor * docs: clarify structured logs spec * docs: plan diagnostics structured logs * docs: add diagnostics structured logs tasks * refactor: rename server logs to diagnostics structured logs * Refactor PostgreSql persistence features to use centralized entity model handler registration. * Refactor EFCore persistence features to centralize entity model handler registration for MySql, Sqlite, and Oracle providers. * Integrate structured logs by renaming server logs, adjusting appsettings, and updating project references. * Switch from PostgreSQL to Sqlite for workflow and identity persistence, update appsettings configuration.
1.8 KiB
1.8 KiB
Quickstart: Live Server Log Streaming
Enable the feature
services.AddElsa(elsa =>
{
elsa.UseServerLogStreaming(options =>
{
options.RecentLogCapacity = 5_000;
options.MaxRecentLogQuerySize = 1_000;
options.SourceHeartbeatTimeout = TimeSpan.FromSeconds(30);
});
});
Map the hub
app.UseServerLogStreaming();
This maps /elsa/hubs/server-logs and any REST endpoints under the configured Elsa API prefix.
Authorize users
Grant operational users the read:server-logs permission.
Validate locally
- Start Elsa Server with the feature enabled.
- Open Elsa Studio with the paired Studio module installed.
- Emit an
ILoggermessage from the server. - Verify it appears in Studio's Server Logs page.
- Change the level filter to
Warningand verify lower-level logs are hidden.
Validation Notes
dotnet test test/unit/Elsa.ServerLogs.UnitTests/Elsa.ServerLogs.UnitTests.csproj --no-restorepasses with 22 server logs tests.dotnet build src/modules/Elsa.ServerLogs/Elsa.ServerLogs.csproj --no-restorepasses.dotnet restore src/apps/Elsa.Server.Web/Elsa.Server.Web.csprojpasses.dotnet build src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj --no-restorepasses.dotnet test test/integration/Elsa.ServerLogs.IntegrationTests/Elsa.ServerLogs.IntegrationTests.csproj --no-restorepasses with 4 server logs smoke tests.- The commands currently report existing repository warnings, including
NU1903forSnappierand nullable/analyzer warnings in unrelated modules.
Clustered deployments
The in-memory provider shows logs for the current process only. For merged multi-pod logs, configure a future shared provider that implements IServerLogProvider; Studio continues to use the same API and hub contracts.