A handler already has one: context.logger, derived from this and tagged
with the operation's identity, which is the better choice wherever it exists.
A service has no operation — a store that reports corrupt data at
construction, a worker client that logs a crash from its own event handler —
and this is how it gets one.
Not a second logging path: it is the same logger context.logger descends
from, and the same sink defineExtension configured. Tag it with
withFields so entries say where they came from.
Injects the application's root logger.
A handler already has one:
context.logger, derived from this and tagged with the operation's identity, which is the better choice wherever it exists. A service has no operation — a store that reports corrupt data at construction, a worker client that logs a crash from its own event handler — and this is how it gets one.Not a second logging path: it is the same logger
context.loggerdescends from, and the same sinkdefineExtensionconfigured. Tag it withwithFieldsso entries say where they came from.