amphp / cluster

Building multi-core network applications with PHP.
MIT License
60 stars 9 forks source link

ClusterLogHandler cannot accept all log records #18

Open wtsergo opened 4 months ago

wtsergo commented 4 months ago

ClusterLogHandler cannot accept all log records. e.g. in \Amp\Http\Server\Driver\Internal\AbstractHttpDriver::handleInternalServerError you have

$this->logger->error(
  "...",
  [
    ...
    'method' => $request,
    ...
  ]
);

Then ClusterLogHandler cannot send such error context via channel because $request have closures in nested properties. Maybe need to add some kind of filter there? e.g. skip unserializable items?

I can contribute on fix for that. Just let me know how do you think such problem should be handled.

Thanks.