Fixed imports in all files which contain the logger import
Logger now uses the logger_config.yaml as the config file
Currently, the speak logger saves all logs into separate .log files
Other default loggers from other modules are only displayed in the console (utilizing the root logger)
In server/app/scripts/helper_db.py, two different methods of imports are used. When initializing the database using init_db.py, the log is recognized as a module because we are running from the same root directory where the __init__.py of the log module is saved. When running flask, it contains its own environment, and log is no longer part of the path, so a relative path is used instead:
to initialize the database: from log import logger
to be used for starting flask: from ..log import logger
To create a local database:
From the server/app directory, run python init_db.py
A database named database.db should be created in the server/app directory.
Changes
logger_config.yaml
as the config filespeak
logger saves all logs into separate .log filesroot
logger)server/app/scripts/helper_db.py
, two different methods of imports are used. When initializing the database usinginit_db.py
, thelog
is recognized as a module because we are running from the same root directory where the__init__.py
of thelog
module is saved. When running flask, it contains its own environment, andlog
is no longer part of the path, so a relative path is used instead:from log import logger
from ..log import logger
To create a local database:
server/app
directory, runpython init_db.py
server/app
directory.To run server app:
conda create -n voice-collector python=3.9.4
server/app
set FLASK_APP=server.app.__init__.py
;export FLASK_APP=server.app.__init__.py
flask run --debug
To run the web app:
yarn install
yarn start
.env to run server app:
.env in web: