Add serilog #5

Merged
Myxelium merged 1 commits from serilog into master 2025-09-27 18:59:34 +00:00
Myxelium commented 2025-09-27 18:59:06 +00:00 (Migrated from github.com)

This pull request adds Seq logging support to the HomeApi project and its build workflow. Seq is a structured log server that helps collect, search, and analyze logs. The changes include updating configuration files, adding necessary NuGet packages, and modifying the application's startup to enable Seq logging.

Logging integration:

  • Added Seq logging configuration to both appsettings.json and appsettings.Development.json, specifying the Seq server URL, API key, minimum log level, and per-namespace overrides.
  • Updated Program.cs to configure logging with Seq by reading settings from the Seq section of the configuration.
  • Added required NuGet packages for Seq logging: Seq.Extensions.Logging, Serilog.Sinks.Console, and Serilog.Sinks.Seq in HomeApi.csproj.

CI/CD workflow updates:

  • Updated .github/workflows/build.yml to include Seq logging configuration in the build process, using both hardcoded and environment-specific values for the Seq server URL and API key. [1] [2]
This pull request adds Seq logging support to the `HomeApi` project and its build workflow. Seq is a structured log server that helps collect, search, and analyze logs. The changes include updating configuration files, adding necessary NuGet packages, and modifying the application's startup to enable Seq logging. **Logging integration:** * Added Seq logging configuration to both `appsettings.json` and `appsettings.Development.json`, specifying the Seq server URL, API key, minimum log level, and per-namespace overrides. * Updated `Program.cs` to configure logging with Seq by reading settings from the `Seq` section of the configuration. * Added required NuGet packages for Seq logging: `Seq.Extensions.Logging`, `Serilog.Sinks.Console`, and `Serilog.Sinks.Seq` in `HomeApi.csproj`. **CI/CD workflow updates:** * Updated `.github/workflows/build.yml` to include Seq logging configuration in the build process, using both hardcoded and environment-specific values for the Seq server URL and API key. [[1]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R127-R134) [[2]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R189-R196)
Sign in to join this conversation.