Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do you have any plans to release 2.3 version of your incredable project? #19

Open
VladAdGad opened this issue Sep 5, 2022 · 7 comments

Comments

@VladAdGad
Copy link

No description provided.

@sighalt
Copy link
Owner

sighalt commented Sep 5, 2022

All features of the release branch 2.3 are merged into version 2.4,which is available via pip. Unfortunate I can't remember why I skipped 2.3.

@VladAdGad
Copy link
Author

I see. https://pypi.org/project/logdecorator/
But why then I don't see 2.4 as a branch or tag in this repo? I mean you have done a tremendous job and worry about that you abandoned project or not. I have plan to contribute if I see something.

And I have a struggle with understanding log_exception and log_on_error. I tried PoC and didn't see any difference. Could you explain more please?

@sighalt
Copy link
Owner

sighalt commented Sep 7, 2022

Thank you for your nice words. I can assure you that I have no plans to abandon this project. I see it as feature complete at the moment though. But if there are good any features, I would not hesitate to merge or implement them.

However, it seems like I forgot to tag 2.4. But the master branch actually is the same code as 2.4.

log_on_error is invoked when an exception is raised, but uses the "normal" logging under the hood. In contrast to that, log_exception uses logging.exception for logging, which also provides information about the exception (See https://docs.python.org/3/library/logging.html#logging.Logger.exception).
Here is an example, which should make the difference more clear:

>>> import logging
>>> try:
...     a = 1/0
... except:
...     logging.error("Some log message")
... 
ERROR:root:Some log message
>>> try:
...     a = 1/0
... except:
...     logging.exception("Some log message")
... 
ERROR:root:Some log message
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ZeroDivisionError: division by zero

@VladAdGad
Copy link
Author

Thank you. Now I see!

@VladAdGad
Copy link
Author

Can you have a look at my pull request please? #20

@VladAdGad VladAdGad reopened this Sep 19, 2022
@sighalt
Copy link
Owner

sighalt commented Sep 19, 2022

@VladAdGad will do so.

@ncwhale
Copy link

ncwhale commented Jun 30, 2023

Put this example in document may be better for user who use it for first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants