aungwinthant / apilogger

Small laravel package for viewing api logs which can be used in debugging.
MIT License
346 stars 61 forks source link

Call to undefined method #34

Open rabol opened 4 years ago

rabol commented 4 years ago

I followed the installation and get this error:

Call to undefined method Symfony\Component\HttpFoundation\StreamedResponse::status() {"userId":1,"exception":"[object] (Error(code: 0): Call to undefined method Symfony\\Component\\HttpFoundation\\StreamedResponse::status() at /home/vagrant/code/testapi/vendor/awt/apilogger/src/AbstractLogger.php:80)
[stacktrace]
#0 /home/vagrant/code/testapi/vendor/awt/apilogger/src/FileLogger.php(61): AWT\\AbstractLogger->logData()
#1 /home/vagrant/code/testapi/vendor/awt/apilogger/src/Http/Middleware/ApiLogger.php(30): AWT\\FileLogger->saveLogs()
#2 /home/vagrant/code/testapi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(207): AWT\\Http\\Middleware\\ApiLogger->terminate()
#3 /home/vagrant/code/testapi/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(178): Illuminate\\Foundation\\Http\\Kernel->terminateMiddleware()
#4 /home/vagrant/code/testapi/public/index.php(60): Illuminate\\Foundation\\Http\\Kernel->terminate()
#5 {main}
aungwinthant commented 4 years ago

May I know if your response was streamed in the routes that use 'apilogger' middleware? Currently the package does not contains support for streamed response. It only works if the response object is Illumitate\Http\Response object.