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:
- The real DI
Loggeris registered byLoggerFeatureinsideApiCoreFeature— per-request, not at the root container where the singleton is built, so it isn't resolvable there. - Even if bridged (via a request-scoped child container, like the WS
authenticatedoes), at boot / timer-fire there's no request context for a context-aware logger to enrich, soconsoleis 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)
Source: webiny/webiny-js