szemul / logging-error-handling-context
Provides an error handler and logging context to manage contextual data to be injected into errors and log messages.
Installs: 1 808
Dependents: 4
Suggesters: 1
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
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
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).