I put together a simple API that only returns JSON objects. I’ve removed all stylesheets, bootstrap, and view files. The controllers return the JSON objects directly.
When an error was encountered I would get this error:
Unable to send log via yii\debug\LogTarget: Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'The directory is not writable by the Web process: /var/www/html/api/web/assets'
Here is the full stack trace: http://pastebin.com/VZTjy5BM
When I created the "assets" directory and gave the web server write access the error went away. The log then displayed the real error. I looked into the new "assets" directory and found it was empty.
I’m curious as to why the “assests” directory is required for error logging? Is there a way to remove that dependency?