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
Logger is registered by LoggerFeature inside ApiCoreFeature — 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
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
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 inlineconsoleLoggershim, because:Loggeris registered byLoggerFeatureinsideApiCoreFeature— per-request, not at the root container where the singleton is built, so it isn't resolvable there.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
consoleshim — so boot logging is consistent and configurable (levels, formatting, sinks) rather than rawconsole.*.Scope: small, cosmetic/infra. Not blocking #5414.
Related