trap icon indicating copy to clipboard operation
trap copied to clipboard

Add lightweight PSR-3 implementation

Open roxblnfk opened this issue 9 months ago • 3 comments

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.
  • 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.

roxblnfk avatar Apr 07 '25 14:04 roxblnfk

Hi! I can take on the issue. The deadline is roughly mid-July.

olegmifle avatar Jun 13 '25 19:06 olegmifle

@olegmifle hi, any updates there?

roxblnfk avatar Aug 12 '25 11:08 roxblnfk

@roxblnfk hello. I need little more time

olegmifle avatar Aug 20 '25 09:08 olegmifle