silverstripe / cwp-core

CWP basic compatibility module
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

FIX SilverStripe debug logs and higher are now routed correctly to syslog (Graylog) #44

Closed robbieaverill closed 6 years ago

robbieaverill commented 6 years ago

As @madmatt pointed out, debugged and solved in #43, this change was somehow missed while upgrading from CWP 1.x to 2.x.

Resolves #43

madmatt commented 6 years ago

My only query is does this mess with people's existing configuration (e.g. Raygun)?

Do logs go to multiple places, or does only one logger 'win'? We should have this as the default, and if you only get one logger that actually works, we should name the YML config and produce docs on how to override with another option.

robbieaverill commented 6 years ago

Do logs go to multiple places, or does only one logger 'win'?

Monolog can have a stack of handlers, which is why we "push" new handlers into the stack. This shouldn't affect any other logging.

madmatt commented 6 years ago

Sweet, I wondered what that push thing was for, nice!

robbieaverill commented 6 years ago

does this mess with people's existing configuration (e.g. Raygun)?

I just checked the raygun module for sanity - it also pushes its own handler, so raygun, core logging, user defined logging and CWP logging would all run in tandem:

https://github.com/silverstripe/silverstripe-raygun/blob/master/_config/config.yml#L14-L17

robbieaverill commented 6 years ago

Will be included in CWP 2.1.1 and any CWP 2.0.x or 2.x releases