nvanheuverzwijn / monolog-logdna

GNU Lesser General Public License v3.0
21 stars 21 forks source link

Pass record extra to logdna metadata as monolog.extra #17

Closed slepic closed 10 months ago

slepic commented 10 months ago

Implementation as discussed in #16

slepic commented 10 months ago

I have used monolog_extra instead of monolog.extra, because that's what eventually shows up in logdna so to make it consistent.

I have also made the parameter $ignoreEmptyContextAndExtra true by default in the constructor and in the getMetadata I add empty object to monolog_extra if someone sets it to false, as opposed to #18 which would just remove it entirely.

This seems like a better solution. Although the change of constructor isn't forbidden at all in php, it seems better to stick to the same signature as the parent, this even makes it a little less breaking change than #18.

If it was on me I'd merge this including the constructor change and close #18 but I leave the decision to you

nvanheuverzwijn commented 10 months ago

@slepic Looks good to me. Anything else you want to add before merging ?

slepic commented 10 months ago

@nvanheuverzwijn nop, i think it's ready