* Fix cycle detection within fibers
We keep a separate depth count per fiber.
Fixes#1752.
* Avoid additional call to Fiber::getCurrent()
Suppresses phpstan errors, as they're false positives.
We introduced the formatter using the incorrect field, which was making
GCP not to extract the correct value from the payload.
This uses the field that actually maps to the expected format.
More info: https://cloud.google.com/logging/docs/structured-logging
We introduced the formatter using the incorrect field, which was making GCP not to extract the correct value from the payload.
This uses the field that actually maps to the expected format.
More info: https://cloud.google.com/logging/docs/structured-logging
Google Cloud Logging doesn't show the correct level log when using
JsonFormatter, making observability a bit trickier. This applies minor
tweaks to the default format, allowing log entries to be properly
represented.
There are alternative packages to this but they add fields that aren't
strictly required - also performing `debug_backtrace()` calls that are
usually not desired when in production mode.
This is a backport of https://github.com/Seldaek/monolog/pull/1690
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Google Cloud Logging doesn't show the correct level log when using
JsonFormatter, making observability a bit trickier. This applies minor
tweaks to the default format, allowing log entries to be properly
represented.
There are alternative packages to this but they add fields that aren't
strictly required - also performing `debug_backtrace()` calls that are
usually not desired when in production mode.
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
- the getter/setter methods for file, level and facility are deprecated in gelf v1.1
- add those fields as additional instead, as suggested in the gelf spec (https://docs.graylog.org/v1/docs/gelf#gelf-payload-specification)
- update tests to reflect changes