-
Notifications
You must be signed in to change notification settings - Fork 1
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
日志记录器对象 stacklevel 定位有时不准确 #5
Labels
bug
Something isn't working
Comments
同样的问题出现在 [2024-07-17 10:23:15] [try:1/3:1] [__main__.func.line12.ValueError] invalid literal for int() with base 10: 'a'
[2024-07-17 10:23:16] [try:2/3:1] [__main__.func.line12.ValueError] invalid literal for int() with base 10: 'a'
[2024-07-17 10:23:17] [try:3/3:1] [__main__.func.line12.ValueError] invalid literal for int() with base 10: 'a'
[2024-07-17 10:23:17] [__main__.TryExcept.__call__.<locals>.inner.line236.ValueError] invalid literal for int() with base 10: 'a' |
2018-11-27
added a commit
to 2018-11-27/exceptionx
that referenced
this issue
Jul 22, 2024
1.`TryExcept` and `TryContext` now support handling exceptions based on exception message strings and have added the functionality to negate exception types. 2.Both `@Retry` and `@Retry()` are now supported as valid syntax, as well as `TryExcept`. 3.Fixed an issue: The retry counter in `Retry` incorrectly started from zero. gqylpy#4 4.Fixed an issue: The `stacklevel` positioning of the logger object was sometimes inaccurate. gqylpy#5 5.Optimized exception output for `Retry`, adding display for `limit_time` and `event`. 6.Fixed a serious issue in `Retry` where exception information might be "spammed" output. 7.Added type checking for the parameter `etype`. 8.The internal default value for retry events has been changed to `None`. 9.Updated annotations, comments, and documentation files for the above changes. 1.`TryExcept` 和 `TryContext` 现在支持按异常消息字符串处理异常,并新增了异常类型取反的功能。 2.同时支持 `@Retry` 和 `@Retry()` 作为有效语法,亦 `TryExcept`。 3.修复问题:`Retry` 中重试计数器错误地从零开始。 gqylpy#4 4.修复问题:日志记录器对象 `stacklevel` 定位有时不准确。 gqylpy#5 5.优化了 `Retry` 的异常输出,增加了对 `limit_time` 和 `event` 显示。 6.修复了 `Retry` 中可能会 “疯狂输出” 异常信息的严重问题。 7.添加对参数 `etype` 的类型校验。 8.重试事件的内部默认值修改为 `None`。 9.针对以上改动更新注解,注释及自述文件。
Merged
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当配合使用
TryExept
和Retry
并传入了日志记录器对象时,后者的stacklevel
定位总是不准确。The text was updated successfully, but these errors were encountered: