Solved

Debug messages don't show up

JackStackOP

I changed prints to logging.debug() and they're gone.

3

Comments 4

Join the discussion

Already have an account? Log in

  1. HenryWrites Solutionreplies: 2

    That's intended at stage 1: basicConfig() sets the level to INFO, so DEBUG messages are filtered out. That's the whole point — debug output stays in the code but is hidden until you need it. Stage 2 turns it back on just for the "fuel" logger.

    2
    1. JackStackOPreplies: 1

      So I can leave debug lines in without spamming the output. Nice.

      2
      1. LucasVD

        I use this at work all the time. Great to see it taught early.

        2
    2. SamPrice

      Per-logger levels are super useful in bigger apps: debug one module without drowning in the rest.

      0