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] Use 'warnings.warn' appropriately

See original GitHub issue

Describe your feature request

Throughout our codebase, we don’t use warnings.warn and rather rely on logger.warn to inform users of possible negative outcomes.

Instead, we should use warnings.warn appropriately:

https://docs.python.org/2/howto/logging.html#when-to-use-logging

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
richardliawcommented, Dec 12, 2020

yep!

On Fri, Dec 11, 2020 at 2:24 PM Shril Kumar notifications@github.com wrote:

Hi, @richard4912 https://github.com/richard4912 can I go ahead with the PR for this issue? I’ll document the requirements and list of file changes once you give me a green signal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ray-project/ray/issues/12060#issuecomment-743458753, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCRZZPEVBLTENHEMQ6HWXTSUKLYTANCNFSM4TYD7MVA .

0reactions
scottsun94commented, Nov 1, 2022

@ofey404 Do you want to work on it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging.warning vs. warnings.warn - Discussions on Python.org
A question on the difference between logging.warning and warnings.warn came up in the review of my PR: The logging how to has this...
Read more >
What's the difference between logging.warn and logging ...
logging.warn() was kept for backwards compatibility but a deprecation warning was added. logging.warning() is what everyone is supposed to use.
Read more >
Integrating Python's logging and warnings packages - Medium
Do you know a simple way to integrate both warnings and logging facilities? ... your loggers properly (typically by using logging.config.
Read more >
logging.warning vs logging.warn | Python in Plain English
As of Python 3.3, logger.warn has been deprecated and logger.warning must be used. Even though logger.warn is still backwards compatible, you ...
Read more >
logging — Report Status, Error, and Informational Messages
For example, if a message is CRITICAL , and the logger is set to ERROR , the message is emitted (50 > 40)....
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