Skip to content
  • Tim Lieberman's avatar
    Added `addContext(array $context)`; rename `child()` to `withContext()`: · b27be275
    Tim Lieberman authored
    In some contexts, it just makes more sense to layer context onto an existing
    Logger. The impetus for this change was a desire to decorate the context of a
    Logger in some mezzio HTTP middleware. I wanted to capture some data from the
    request, and attach it to the Logger. The middleware receives the logger via
    constructor-injection from the DIC, and does not pass it on. The middleware
    can't know about the DIC, so this seems to be the best solution, even if it
    makes makes things feel less immutable.
    b27be275