-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Log to error_log
in fatal case
#36316
Conversation
Thanks for this PR it helps me to identify the problem I don't understand why there is a try..catch without log |
@nickvergessen I think the CI/CD errors are not related to these changes, right? So could we merge this? |
I would recommend to rebase, to proof it.
No, missing 2 approvals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me then but didnt test
0db36d8
to
e4aea28
Compare
The only test currently failing is
Would assume this is not related to the current change? |
Any chance to get this minor change merged, please? |
CI fail is known and unrelated. |
Signed-off-by: Robin Windey <[email protected]>
e4aea28
to
1dcc855
Compare
CI failure unrelated |
Summary
Write a log message via
error_log
in case we can't regularly write to our logfile. This improves troubleshooting.Use case
Example:
We forgot to install the
php-apcu
module but configured it inconfig.php
. This could happen for example when upgrading the PHP version or when not properly reading the manual.Before:
When trying to access NC, we're presented with a generic error message.
Neither
nextcloud.log
nor/var/log/apache2/error.log
(or something similar) is written. As an admin we absolutely don't know what's going on (Btw: I only solved this by debugging via XDebug).After:
There is a log entry in
/var/log/apache2/error.log
telling us:This is not formatted nicely but it tells the admin what's the problem and why the NC server instance is down.
Checklist