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

How to use Logger with Stream?

when i use $logger = new \Phalcon\Logger\Adapter\Stream("https://localhost/logger.php");

the php script error:

Warning: fopen(https://localhost/robots.txt): failed to open stream: HTTP wrapper does not support writeable connections in /data/www/linktour/api/public/index.php on line 3

Fatal error: Uncaught Phalcon\Logger\Exception: Can't open stream 'https://localhost/robots.txt' in /data/www/linktour/api/public/index.php:3 Stack trace: #0 /data/www/linktour/api/public/index.php(3): Phalcon\Logger\Adapter\Stream->__construct('https://localhos...') #1 {main} thrown in /data/www/linktour/api/public/index.php on line 3

edited May '17

Stream adapter expect stream output, not http url.