-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors not logged #255
Comments
Checked, all errors are logged out of the box. Please check your logger configuration. |
@devanych no changes made to configuration, clean demo install. |
Very strange :) If I have logs, and you do not, then this is not a logger's problem. Maybe the problem is the rights to the runtime folder, you could try changing the rights to 0777 and try again? |
@devanych no problems with folders, code just doesnt get executed. |
@devanych make a clean app install and check. |
Can't reproduce // \App\Controller\SiteController
public function index(): ResponseInterface
{
throw new \RuntimeException('test');
return $this->viewRenderer->render('index');
} produces in
|
@Nex-Otaku I also have everything working correctly, as well as @BoShurik. Both on localhost and in docker. |
That should be something very specific to @Nex-Otaku environment. I'm afraid we can't fix it since we have no such environment. @Nex-Otaku in case you'll find out the details, let us know. |
Experimented with it a bit. Application does log errors in web mode, but not in all cases, and does not log errors in console mode at all. Steps to reproduce on Ubuntu 20.04, PHP 7.4 (WSL). Web:
Console:
|
It happens because Cycle tried to read SQLite schema during container initializaition before fully configured logger replaces initial one: |
We've fixed web app case and threre is a separate issue for console: yiisoft/yii-console#110 |
Checked web application, errors are logged correctly to |
Fixed for console application as well. |
Application does not log errors.
Update 2021-03-16:
Web application with disabled SQlite PHP extension throws error that is not logged.
Console application does not log error on any exception.
What steps will reproduce the problem?
Throw any exception in application code, for example \RuntimeException
What is the expected result?
Error appears in log file: /runtime/logs/app.log
What do you get instead?
No errors in log
Additional info
Errors are not logged in both console and web.
In Yii2 basic application, application errors are logged by default.
The text was updated successfully, but these errors were encountered: