colinlennon / xDripAPS

REST service designed to allow xDrip CGM data to be used in OpenAPS
13 stars 23 forks source link

Where does debug output get written #5

Closed renegadeandy closed 5 years ago

renegadeandy commented 5 years ago

It appears that print output doesn't get written to a specific log file, ideally it would be handled in here on its own to ensure consistent debugging approaches.

Additionally, I also spotted token based auth is not supported, and also the reliance on the API_SECRET env var being a hashed version of the password is not clear enough.

This didn't work in my rig, as API_SECRET was a token. I chose to make an env var API_SECRET2 and alter the code in this project to read that instead.

colinlennon commented 5 years ago

It doesn't write to a specific log file to ensure it works across different filesystems/distros - when I created this, there were a couple of different distros being used on Edison, and Raspbian on Raspberry Pi. You can redirect the output to wherever you'd like to capture it, e.g. @reboot python /home/root/.xDripAPS/xDripAPS.py | tee -a /path/to/xDripAPS.log

I think passphrase authentication, rather than token-based authentication, was the approach recommended in the OpenAPS docs when I created this, so as you say there's no support for tokens. I'm now using AndroidAPS but can try to add this and ask for some volunteers to test, or if you want to add you can create a pull request.

renegadeandy commented 5 years ago

Hi Colin. I have addressed this issue in my pull request.