diff options
author | Frederick Muriuki Muriithi | 2023-05-23 06:21:07 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-05-23 06:21:07 +0300 |
commit | 589be0fd6dfd1cbcf091c0814d5e9c86c3ca33ad (patch) | |
tree | 3d5a633ced866af634ac98f3eb5eb5837daf3513 | |
parent | 8de60b4b23d9613ff54275791536afb3ba1b2c39 (diff) | |
download | genenetwork3-589be0fd6dfd1cbcf091c0814d5e9c86c3ca33ad.tar.gz |
Document how to log out information in GN3
-rw-r--r-- | README.md | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -338,6 +338,28 @@ pip freeze --path venv/lib/python3.8/site-packages > requirements.txt ``` +## Logging + +During development, there is periodically need to log what the application is +doing to help resolve issues. + +The logging system [was initialised](https://github.com/genenetwork/genenetwork3/commit/95f067a542424b76022595a74d660a7e84158f38) +to help with this. + +Now, you can simply use the `current_app.logger.*` logging methods to log out +any information you desire: e.g. + +```python +from flask import current_app + +... + +def some_function(arg1, arg2, **args, **kwargs): + ... + current_app.logger.debug(f"THE KWARGS: {kwargs}") + ... +``` + ## Genotype Files You can get the genotype files from http://ipfs.genenetwork.org/ipfs/QmXQy3DAUWJuYxubLHLkPMNCEVq1oV7844xWG2d1GSPFPL and save them on your host machine at, say `$HOME/genotype_files` with something like: |