NuGet · nuget

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging

Core Feature for Logging for Eltheon Framework

Install

Install-Kommandos

dotnet add package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging --version 0.9.0.17
<PackageReference Include="Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging" Version="0.9.0.17" />
paket add Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging --version 0.9.0.17
Install-Package Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging -Version 0.9.0.17

README

Vorschau

Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging

Overview

This feature collects the log-centric utilities used by the Eltheon runtime. It includes models describing Serilog log lines, services that rotate/ archive log files, and helper factories that expose log metadata to the admin dashboard or external tooling.

Key Pieces

  • LogEntry, LogShortEntry, LogFile provide strongly-typed access to log metadata so Razor pages and APIs can filter or present log summaries without parsing raw text.
  • ArchiveLogsService : BaseService integrates with the Service feature to periodically move or delete stale log files using the shared GlobalConfig paths.
  • Factories and middleware make it simple to register archive services, expose log endpoints or plug in additional sinks.

Usage

builder.Services.AddSingleton<ArchiveLogsService>();
builder.Services.AddHostedService<ArchiveLogsService>();

Configure GlobalConfig.LogPath before the host starts so the archive service knows where to look. Service triggers can be defined through ServiceConfig JSON files to control archive cadence.

Diagnostics

Because the archive service inherits from BaseService, each run is tracked in the Service feature’s execution history, which also feeds the Admin Dashboard. Enable the logging category Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Logging to observe archive operations or serialization errors when reading log files.

Metrics

With the Metrik feature enabled and AddMetricsLogging() registered, every log entry of level Warning+ increments:

  • eltheon_logs_total{level,category} – counter per log level (Warning/Error/Critical) and logger category. Filterable by instance in Prometheus/Grafana.