question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logging level should be logging.NOTSET

See original GitHub issue

332 | # instead of `logger.debug` outside of this function becomes an
-- | --
333 | # error.
334 |  
335 | if verbose:
336 | logging.basicConfig(format="%(levelname)s %(message)s", level=logging.DEBUG)

Calling basicConfig is unfriendly to other Python code that wants to use the logging as it cannot be called twice. If it must be called I think it should be called with logging.NOTSET

I bring this up because I have a custom log level set to 5 and I cannot see it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
marlonjamescommented, Jan 19, 2021

The problem is utils.get_sim_time() is called to inject the current time into the log message, which calls simulator.get_sim_time(), which raises the RuntimeError.

1reaction
ktbarrettcommented, Jan 19, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

About NOTSET in python logging - Stack Overflow
When a logger is created, the level is set to NOTSET (which causes all messages to be processed when the logger is the...
Read more >
Python Logging Levels Explained - LogicMonitor
Log levels relate to the “importance” of the log. For example, an “error” log is a top priority and should be considered more...
Read more >
logging — Logging facility for Python — Python 3.11.1 ...
Logging messages which are less severe than level will be ignored; ... logger has a level of NOTSET, its chain of ancestor loggers...
Read more >
Python Logging: In-Depth Tutorial - Toptal
When a logger decides whether a log should pass according to the level check (e.g., if the log level is lower than logger...
Read more >
Python Logging Guide: The Basics - CrowdStrike
Notset, 0, Default level when a new logger is created. Setting the root logger to NOTSET logs all messages. For other loggers, NOTSET...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found