trap
trap copied to clipboard
Add lightweight PSR-3 implementation
Description
Add a standalone PSR-3 implementation that works with Trap and is compatible with both fiber-based asynchronous code and synchronous execution.
Requirements
- Implementation must be self-contained without dependencies from other packages or project parts
- Must be for client-side of the project only
- Must function in both async code with fibers and synchronous code
- To detect async execution just check that
\Fiber::getCurrent()is not null - Non-blocking mode in async case.
- To detect async execution just check that
- Should attempt to send logs to Trap server using Monolog format first
- Fall back to STDERR in text format if connection fails
- Logger should be accessible via
trap()::logger()
Implementation Notes
The logger needs to handle both execution contexts appropriately and prioritize Trap server logging with graceful fallback to STDERR.
Hi! I can take on the issue. The deadline is roughly mid-July.
@olegmifle hi, any updates there?
@roxblnfk hello. I need little more time