aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-23 06:21:07 +0300
committerFrederick Muriuki Muriithi2023-05-23 06:21:07 +0300
commit589be0fd6dfd1cbcf091c0814d5e9c86c3ca33ad (patch)
tree3d5a633ced866af634ac98f3eb5eb5837daf3513 /README.md
parent8de60b4b23d9613ff54275791536afb3ba1b2c39 (diff)
downloadgenenetwork3-589be0fd6dfd1cbcf091c0814d5e9c86c3ca33ad.tar.gz
Document how to log out information in GN3
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 53fad3d..e0dbb4f 100644
--- a/README.md
+++ b/README.md
@@ -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: