docker-freepbx icon indicating copy to clipboard operation
docker-freepbx copied to clipboard

Debug logging not working in Watson Transcription script

Open leorg99 opened this issue 3 years ago • 3 comments

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.

leorg99 avatar May 25 '21 16:05 leorg99

I think the issue may be this https://stackoverflow.com/a/39982630/3629536

leorg99 avatar May 25 '21 16:05 leorg99

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...

tiredofit avatar May 25 '21 16:05 tiredofit

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.

leorg99 avatar May 25 '21 17:05 leorg99