szemul / logging-error-handling-context
Provides an error handler and logging context to manage contextual data to be injected into errors and log messages.
Package info
github.com/szemul/logging-error-handling-context
pkg:composer/szemul/logging-error-handling-context
Requires
- php: ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0.0
- jetbrains/phpstorm-attributes: ^1.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.8.5
- phpunit/phpunit: ^9.5.5
Suggests
None
Provides
None
Conflicts
None
Replaces
- szemul/logging-error-handling: ^1.0.0
README
Provides an error handler and logging context to manage contextual data to be injected into errors and log messages.
Context
The context is useful for storing values used to enrich logs and errors. The context class supports switching contexts. When adding a new context, the existing values are preserved, and you can switch back to any previous context and recover the state (switching back drops any changes in any newer context).