Enabling debugging with autoinstall via env variables seems brocken
I created a new instance with docker-compose (using autoinstall) where the env variables
- FRIENDICA_LOGFILE=/tmp/friendica.log
- FRIENDICA_LOGLEVEL=debug
- FRIENDICA_DEBUGGING=true
are set.
Executing into the friendica container before trying to register the admin user showed that no log has been created. The env variables passed are available.
After registering the admin user with bin/console user add and logging into the instance the Logs settings under Admin showed:
It seems obvious that the log is not created and logging not enabled as expected.
@MrPetovan maybe you can help here. The env variables mentioned above are not handled in the docker scripts so I assume that they are handled by friendica and found in /src/Core/Config/Util/ConfigFileManager.php:100 the only reference which seem to load the env variables into a config cache.
Is there any trick how I can take a look at the config cache at runtime? I don't have an IDE or development tools available as I need to do this inside the docker container.
If you can edit files in the container, you can add var_dump($this->config); at the end of Friendica\Core\Config\ValueObject\Cache->load in src/Core/Config/ValueObject/Cache.php on line 96:
https://github.com/friendica/friendica/blob/9d506071c8c53199b6e8183589a008632e3f3646/src/Core/Config/ValueObject/Cache.php#L81-L97
@m33m33, @comradeferret Maybe you can help.
I trying to get the installation running with the current dev version but it still fails. I thought that with enabled logging in the docker container I can get a bit more information. But I don't get the logging (into friendica.log) working in the container before I start the install wizard or try to register the admin user in the login page. It's just not there.
I created two issues #286, #287 to keep track of the current state and the docker-compose file I use.
Can you please try if you get the log working? Or just check if you have the same behaviour? It would be really helpful to get the debug logging enabled.
As the used env variables are not used within the wizard or the autoinstall I'm not sure even if it can be enabled before the setup is finished.
Alternativly, do you have an idea how to enable php logging? Maybe this helps.
@ne20002 I couldn't get the dev version working either, I just use the stable.
The env for log file has been working with fpm image today. Need to recheck with apache image.