Skip to main content

Notification Logging Reference

Summary

The service emits ten distinct log statements. Logs are JSON to console with scopes included and UTC timestamps.

Audience

DevOps engineers, engineers, support and QA.

Reference Content

The verified reference material for this topic is set out in the sections below.

Format and levels

Providers are cleared and replaced by a JSON console logger with scopes enabled, UTC timestamps and a fixed timestamp format. The default minimum level is information; the ASP.NET Core category is raised to warning.

Correlation middleware opens a scope carrying the correlation identifier and the service name, so every log line written during an HTTP request carries both.

Log statement catalog

LevelSourceMessage subjectOperational meaning
InformationDispatcherDuplicate event skipped, with event id and typeIdempotency working as intended — not a problem
InformationDispatcherStale event ignored, with occurrence timeEvent older than the staleness window
WarningDispatcherDelivery failed after N attempts, with message id and channelA message exhausted its retries and is now in the failed queue
InformationEmail senderConsole email outputThe console provider is active — nothing was actually sent
InformationSMS senderPlaceholder SMS output, stating no real provider is configuredSimulated delivery only
InformationWhatsApp senderPlaceholder WhatsApp output, stating no real provider is configuredSimulated delivery only
WarningConsumerCould not connect to the broker, naming host and port, retryingConsumption has stopped; recurs until the broker returns
InformationConsumerBound to the queue, listing the subscribed event typesConsumption is active — the readiness signal
ErrorConsumerUnhandled error processing a delivery; requeueingInfrastructure failure; the message goes back to the queue
ErrorConsumerNegative acknowledgement itself failedThe broker connection is failing while handling a failure

The two lines that matter most

The bound-to-queue information line is the only positive confirmation that consumption is active. Since the health endpoint registers no checks, this log line is the sole signal that the consumer connected and subscribed. It is emitted once per successful connection.

The connect-failure warning is the only signal that consumption has stopped. It repeats on a fixed interval while the broker is unreachable. Nothing else — not health, not metrics, not the UI — reflects that state.

Both are load-bearing for operations and neither is surfaced anywhere except the log stream.

Level distribution

Six information, two warning, two error. Notably a delivery exhausting its retries is a warning, not an error — errors are reserved for infrastructure faults at the consumer boundary.

What is not logged

  • No log on successful delivery, message creation or event processing completion — those are recorded in the audit trail instead, not in logs.
  • No log on template resolution failure or preference suppression — again audit-only.
  • No log of payload content.
  • No structured event or trace identifier on most lines; correlation reaches logs only through the HTTP request scope, so broker-driven processing does not carry a correlation scope in its log lines.

That last point is significant: the richest processing path — event consumption — has the least log context.

Public-safety note

The email console sender writes rendered subject and body to the log stream, and the placeholder senders write the destination address and subject. Where the console provider or placeholders are active, notification content and recipient addresses reach the logs. This is a verified behavior of the development-default providers.

Classification

Implemented.

Requires confirmation

Whether the console email provider and placeholder senders are used in any environment where logs are retained requires confirmation.

See Also

Keywords

  • Notification database
  • Logging Reference
  • Draft database documentation

Source References

  • microservices/src/notification-service/Application/NotificationDispatcher.cs
  • microservices/src/notification-service/Messaging/NotificationEventConsumer.cs
  • microservices/src/notification-service/Channels/EmailSenders.cs
  • microservices/src/notification-service/Channels/PlaceholderSenders.cs
  • microservices/src/notification-service/Channels/InAppSender.cs
  • microservices/src/shared-kernel/Extensions/ObservabilityExtensions.cs
  • microservices/src/shared-kernel/Middleware/CorrelationIdMiddleware.cs

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-21
  • Review cycle: Quarterly