NTX-McGill / NeuroTechX-McGill-2021

Other
16 stars 5 forks source link

Software: Add logging for each file #44

Closed mlej8 closed 3 years ago

mlej8 commented 3 years ago

A logger is needed for each file so that we can log information about the application and how it performs when running in production. In this way if an issue happens, we can directly look at the log to understand what happened and how to reproduce the bug.

mlej8 commented 3 years ago

@archarbar @superkaiba , please add a logger to each file using

from flask import current_app 

then replace all print() by current_app.logger.info() or add current_app.logger.info() where you think it would be useful for us to know the current state of the app.

Then configure the logger to log to a separate file so that while the app is running, if something went wrong we can directly go check the log file to see what happened.

mlej8 commented 3 years ago

will be pushed in origin/start-stop-openbci