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.

Get the current logging level

See original GitHub issue

What is the recommended way to get the current logging level? I’m currently using logger._core.min_level. Is there a better way to query the current logging level (without accessing a private instance member)?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kthycommented, Feb 2, 2022

Came here looking for a solution to logging the loglevel (it’s configurable from the command line in my application) but respect the design choice. Suggest closing the issue as WONTFIX.

0reactions
Delgancommented, Feb 3, 2022

Thank you for your understanding @kthy. Closing the ticket as suggested. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get the current log level in python logging module
Is it possible to get the current log level from the logging package? For example, lets say I pass logger.INFO("test") I need a...
Read more >
How do I get the current Level of a Logger? - Kode Java
Here we demonstrate how to obtain the current level of the Logger instance. The log level will be inherited from the parent logger...
Read more >
logging — Logging facility for Python — Python 3.11.1 ...
Note that Loggers should NEVER be instantiated directly, but always through the module-level function logging.getLogger(name) .
Read more >
Python Logging: In-Depth Tutorial - Toptal
Python Logging Levels ... The log level corresponds to the “importance” a log is given: an “error” log should be more urgent then...
Read more >
Python Logging Basics - The Ultimate Guide To Logging
Logging Levels ​​ When you set a logging level in Python using the standard module, you're telling the library you want to handle...
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