#5446·webiny-js

Self-hosted scheduler: revisit the boot-time consoleLogger shim

Author: adrians5jCreated Jul 20, 2026Updated Jul 20, 2026

Follow-up from PR #5414.

registerSchedulerServer (packages/api-event-handler-server/src/scheduler/schedulerServer.ts) constructs the root Bree scheduler singleton at boot and feeds it a minimal inline consoleLogger shim, because:

  1. The real DI Logger is registered by LoggerFeature inside ApiCoreFeatureper-request, not at the root container where the singleton is built, so it isn't resolvable there.
  2. Even if bridged (via a request-scoped child container, like the WS authenticate does), at boot / timer-fire there's no request context for a context-aware logger to enrich, so console is functionally equivalent.

So it's correct for now, but worth revisiting: e.g. a proper root/boot-scoped logger abstraction shared by all the boot-time singletons (scheduler, background tasks, websockets) instead of an ad-hoc console shim — so boot logging is consistent and configurable (levels, formatting, sinks) rather than raw console.*.

Scope: small, cosmetic/infra. Not blocking #5414.

Related

  • PR #5414
  • #5429, #5433 (other server-flavour follow-ups)