docker-freepbx
docker-freepbx copied to clipboard
Debug logging not working in Watson Transcription script
With the following env variables set:
environment:
- "DEBUG_MODE=TRUE"
- "CONTAINER_LOG_LEVEL=DEBUG"
and running docker-compose logs app
, I definitely see that debug logging is working.
However, it doesn't appear that the print_debug
calls here https://github.com/tiredofit/docker-freepbx/blob/15/install/usr/sbin/watson-transcription are working. The script is definitely being executed because I am getting emails with the transcription, but logging doesn't seem to work.
I think the issue may be this https://stackoverflow.com/a/39982630/3629536
Remind me how we are calling this? I'm wondering if the logging is appearing somewhere else (ie the asterisk files).
The script is running in the background, hence wouldn't send that information to the console.. We would have to do some redirections within the script to log it to a file in order for this to work I assume...
Yes. It is being called by Asterisk in the voicemail application. I ran a test by entering the container with a bash shell and executed a test script I created that has a print_debug and it worked. It did not show that output in the docker log, so it must be that it's not being redirected when run from a child process. I also did not find the Watson logs in any asterisk log files.