Debugging mode is automatically switched off
-
Hello,
I added the line
'debug' => true,
to myconfig.php
file. After saving and restarting the app, the line is kept but it is changed to false instead of true. According to the docs and according to Nextcloud docs, this should work. I'm on NextCloud 27.0.2. Is this some bug in Cloudron? I need this to debug an issue with theRecognize
app. For some reason the download of the trained models is broken.Best Regards,
-
Right, on package restart the debug value is overwritten to false. I have removed this from the package. Next release should fix it.
-
@warg published
-
Could it be that the logging of Nextcloud is just broken within Cloudron? I just noticed and tried a few things but at the end, I don't get any PHP warnings or errors; neither in the container's log nor in the
/data/nextcloud.log
file. Even what I try might not throw any critical errors or warnings, I bet other stuff would throw some as Nextcloud is quite complex.What I tried to make debugging work:
- add
'debug' => true,
as third line of config (first line of the array) - changed
'loglevel' => '3',
to zero (should be documented that Cloudron has a different default value for it than the standard NextCloud documentation mentions) - didn't change much, so I also changed
'logfile' => '/dev/stderr',
to//'logfile' => '/dev/stderr',
(but it looks like it got reverted?! -> maybe this is the cause why the file/data/nextcloud.log
doesn't get updated; last update is 4 month ago; was this changed?)
So basically I don't get the issue debugged because the debugging is not working.
EDIT: For some reason I get
Aug 19 19:25:31 {"reqId":"Wg5Sh91vaYVjy6qvqFIW","level":3,"time":"2023-08-19T17:25:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/dev/stderr): Failed to open stream: No such file or directory at /app/code/lib/private/Log/File.php#84","userAgent":"--","version":"27.0.2.1","data":{"app":"PHP"}}
errors now (I had protocol view of NextCloud open but not at that moment so either it comes from elsewhere or the log is quite delayed). I will have to check this later. - add
-
-
@warg said in Debugging mode is automatically switched off:
didn't change much, so I also changed 'logfile' => '/dev/stderr', to //'logfile' => '/dev/stderr', (but it looks like it got reverted?! -> maybe this is the cause why the file /data/nextcloud.log doesn't get updated; last update is 4 month ago; was this changed?)
yes, correct, we always configure log to stdout/stderr whenever possible. This is one thing we picked form 12 factor app design - https://12factor.net/logs
-
If you really want to debug with logging to file:
- Place app in repair mode
- Open web terminal and then start the app using
/app/pkg/start.sh
- Feel free to edit the config file as you see fit
Note that this is only debugging mode. So, if you close the web terminal, the app is not running anymore.
-
Thanks for the feedback although it's still open why there's a 4 month old logfile if logging was ever done to /dev/stderr.
Anyway, in the meantime I opened a GitHub issue at their repository and we found further indications what is wrong. I'm awaiting feedback from the dev to see why this should be a general write issue with my NextCloud instance when uploading and editing files works.
-