Skip to content

[Infra] Wire Discord Logger into Engine and Offboarding Microservices#227

Merged
aaron-iz merged 2 commits into
mainfrom
aaroni/feature/use-discord-logger-in-microservices
Apr 19, 2026
Merged

[Infra] Wire Discord Logger into Engine and Offboarding Microservices#227
aaron-iz merged 2 commits into
mainfrom
aaroni/feature/use-discord-logger-in-microservices

Conversation

@aaron-iz
Copy link
Copy Markdown
Member

Adds Discord logging to the Chronos.Engine and Chronos.Offboarding worker services, matching the existing setup in Chronos.MainApi. Both services already had transitive access to the Discord logger through Chronos.Shared (via Chronos.Data), but never wired it up — they were only logging to the console.

Changes

src/Chronos.Engine/Program.cs

  • Added using Chronos.Shared.Logging
  • Configured DiscordLoggerConfiguration from the DiscordLogger config section
  • Registered the Discord logger with bot name "ChronosEngine"

src/Chronos.Offboarding/Program.cs

  • Added using Chronos.Shared.Logging
  • Configured DiscordLoggerConfiguration from the DiscordLogger config section
  • Registered the Discord logger with bot name "ChronosOffboarding"

src/Chronos.Engine/AppSettings/appsettings.json

  • Added DiscordLogger.DiscordWebhookUrl configuration placeholder

src/Chronos.Offboarding/AppSettings/appsettings.json

  • Added DiscordLogger.DiscordWebhookUrl configuration placeholder

Configuration

Both services read the webhook URL from:

  • appsettings.json: DiscordLogger:DiscordWebhookUrl
  • Environment variable: DiscordLogger__DiscordWebhookUrl

If the webhook URL is empty, the logger falls back to console-only logging (no Discord messages are sent), so this is fully backward-compatible.

Deployment Note

To enable Discord logging for these services in the deployed environment, add DiscordLogger__DiscordWebhookUrl=<url> to the .engine.<CLOUD_ENV>.env and .offboarding.<CLOUD_ENV>.env files in Chronos.ServiceProxy.

@aaron-iz aaron-iz requested a review from noamarg April 19, 2026 19:35
@aaron-iz aaron-iz self-assigned this Apr 19, 2026
@aaron-iz aaron-iz added enhancement New feature or request feature labels Apr 19, 2026
@aaron-iz aaron-iz merged commit 21e99e7 into main Apr 19, 2026
1 check passed
@aaron-iz aaron-iz deleted the aaroni/feature/use-discord-logger-in-microservices branch April 19, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants