dib-lab / khmer

In-memory nucleotide sequence k-mer counting, filtering, graph traversal and more
http://khmer.readthedocs.io/
Other
740 stars 295 forks source link

Investigate adding a logging framework #1024

Open ctb opened 9 years ago

ctb commented 9 years ago

It would be nice to have a unified way to enable/disable logging at both the Python and C++ levels.

For a survey, see:

https://twitter.com/ctitusbrown/status/601745781771603971 https://twitter.com/ctitusbrown/status/601745886054653952

and conversations therein.

mr-c commented 8 years ago

http://netlogger.lbl.gov/software might be good

camillescott commented 8 years ago

I just checked out netlogger, it looks quite bloated / poorly documented / confusing. After considerably more googling than I expected this to require, I came across an old but dead simple library, cx_Logging, that seems to do what we need. The one line description:

cx_Logging is a Python extension module that behaves similarly to the logging module found in the standard Python library but has a C interface in addition to a Python interface.

ie, exactly what we need. That there are so few solutions for this use-case is actually rather startling, and the general advice is "wrap a C++ logger in CPython," without linking to any code.

The license is... non-standard, but it's pretty much a "do anything, don't quote as us endorsers of your project":

Links:

  1. Main: http://cx-logging.sourceforge.net/
  2. Documentation: http://cx-logging.sourceforge.net/html/index.html
  3. License: http://cx-logging.sourceforge.net/LICENSE.txt

Thoughts?

mr-c commented 8 years ago

+1 to cx-logging

mr-c commented 8 years ago

Also, that's a standard 3 clause BSD license, same as us.

luizirber commented 8 years ago

Seems to be updated here: https://bitbucket.org/anthony_tuininga/cx_logging/

On Tue, Jul 28, 2015 at 7:31 PM, Michael R. Crusoe <notifications@github.com

wrote:

Also, that's a standard 3 clause BSD license, same as us.

— Reply to this email directly or view it on GitHub https://github.com/dib-lab/khmer/issues/1024#issuecomment-125781436.

ctb commented 8 years ago

-1 on doing anything more about an external logging package before 2.0, y'all. Let's get this release out.

ctb commented 5 years ago

https://www.ccdatalab.org/blog/2019/2/28/better-logging-in-python