We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon Stream Log

Hello, how to retrieve the data when logging with Php Stream

$logger = new \Phalcon\Logger\Adapter\Stream("php://memory"); $logger->log("This is a message"); $logger->log("This is a message 2");

How to retrieve this data?

I tried with stream_get_contents, but it requests a valid fopen resource.

Any help please,

Thanks

$logger->log this function be used to write data if you want to get stream data , you can use php's stream_* functions



3.2k

<code> I found this one , but it requests a Stream Resoure, ex:

$stream = fopen('php://memory','r+'); ... ...

stream_get_contents($stream);

But i see the stream in phalcon Log the is protected, inside the class. How can i retrieve this stream resource from Logger?

Thanks