muon icon indicating copy to clipboard operation
muon copied to clipboard

unify logging

Open ilia-kats opened this issue 4 years ago • 1 comments

We didn't establish a clear policy around logging early on, so now some parts of muon use Scanpy's logger, while others issue plain warnings using the warnings module. Ideally, this should be unified, one way or another.

ilia-kats avatar Jun 21 '21 14:06 ilia-kats

There are at least these options to consider, I assume:

  • built-in Python logging,
  • scanpy logging, configurable through scanpy.settings.verbosity,
  • re-using scanpy logging internals but make it configurable through muon.set_options.

I would lean towards the last option since I would not expect scanpy.settings.verbosity to affect another package and I would also expect to be able to tune it separately if needed. I can expect it would frequently mean defining verbosity options across two lines instead of a single line of code but it seems to me more explicit and hence better.

Any thoughts?

gtca avatar Jul 06 '21 13:07 gtca