Docs/Advanced

Logging and operational diagnostics

The kernel exports logging contracts and a console logger. Database and mail providers can connect to the kernel logger when the token is available. Use the same structured…

2 min read

The kernel exports logging contracts and a console logger. Database and mail providers can connect to the kernel logger when the token is available. Use the same structured context in application logs so failures can be correlated across providers.

What to log#

Useful fields include:

  • application release/version and environment;
  • provider or subsystem name;
  • operation type and duration;
  • request correlation ID, if your application supplies one;
  • a stable, non-sensitive entity identifier when appropriate.

What not to log#

Never log passwords, session tokens, recovery/verification codes, encryption keys, database connection strings, full email bodies, or uploaded file contents. Avoid logging full personal records unless the operational need and retention policy have been reviewed.

Startup diagnostics#

  • Log which providers have been registered and successfully booted.
  • Fail startup when required configuration is absent.
  • Report migration failures clearly and stop deployment when schema compatibility is required.
  • Confirm that mail delivery is not using console mode in production.
  • Confirm that the configured storage is persistent and writable.

Event bus limitation#

The kernel event bus is in-process asynchronous pub/sub. It is not a durable message broker, job queue or distributed event log. Use a durable infrastructure service for work that must survive process restarts or be delivered across instances.

veap
Preparing0%