georgeamccarthy / protein_search

The neural search engine for proteins.
GNU Affero General Public License v3.0
15 stars 6 forks source link

Improve logging #23

Open fissoreg opened 3 years ago

fissoreg commented 3 years ago

As the project gets more complex and computationally intensive, some logging will be necessary for monitoring the behavior of the system.

georgeamccarthy commented 3 years ago

Clarify progress on the command line. E.g. progress bar while computing the embeddings. Say done when the indexing is done etc. Found this many results etc.

georgeamccarthy commented 3 years ago

Added simple logging #26 but could be improved, see feedback:

At a certain point I think we should rather align to the Python logging standard: https://docs.python.org/3/howto/logging.html

And specifically with a Jina flavor: https://docs.jina.ai/api/jina.logging.logger/

We can merge this now and keep #23 open for the enhancements.

_Originally posted by @fissoreg in https://github.com/georgeamccarthy/protein_search/issues/26#issuecomment-883274292_

Rubix982 commented 3 years ago

As a user of your application I would like to have logging depending on how deep I will want to work with this project. Some things that come to the mind immediately are,

  1. I would like to configure environment variables such as PS_DEBUG or PS_EXECUTOR_LOG to either 1 (True) or 0 (False) in the root of the project
  2. I'm unfamiliar with the internal workings of your project, so I would like a logging module or a logging class that has an easy interface, and which I can reuse through out the project. It would be great if all the logging done takes input from the environment variables as per above, and then logs accordingly ... maybe I only wish to see logging results from certain components?
  3. See logging to the screen will make me see a lot of text, I would like to see color coded logging to make sure I'm only really ever concerned with some logs and not all. See this stackoveflow post for reference.