Giter Club home page Giter Club logo

Comments (5)

boudewijn-tribler avatar boudewijn-tribler commented on June 12, 2024
  • Option 2 doesn't allow the distinction between info and debug that we are currently using.
  • Option 3 introduces another if in the system, and I prefer to avoid doing that (we should only use the logger, with as few exceptions as possible)
  • Option 4 seems the lesser evil, and would be my choice. We can still get database statistics using --runtime-statistics and --explain-query-plan.

from dispersy.

NielsZeilemaker avatar NielsZeilemaker commented on June 12, 2024

We could add a special verbose level for just the sql stuff.
http://stackoverflow.com/questions/9042919/python-logging-is-there-something-below-debug

from dispersy.

boudewijn-tribler avatar boudewijn-tribler commented on June 12, 2024

That would solve this problem. But is it the right thing to do here? It means that we will be using a 'modified' version of the standard logging. Keeping to the standard has its benefits in readability and cleanness.

As the author of the first post points out: "though the docs say that that should rarely be necessary and may even be undesirable".

from dispersy.

NielsZeilemaker avatar NielsZeilemaker commented on June 12, 2024

Don't trust the internets, the docs don't actually say that. They say: "Defining your own levels is possible, but should not be necessary, as the existing levels have been chosen on the basis of practical experience."

However, I do agree with you that is seems to be a bit of a hack. Alternatively we could simply use the NOTSET level.

logger.log(logging.NOTSET, 'msg')

from dispersy.

boudewijn-tribler avatar boudewijn-tribler commented on June 12, 2024

Yes, using NOTSET would be a good alternative.

from dispersy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.