-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adding logger modules #268
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
+ Coverage 84.88% 86.21% +1.32%
==========================================
Files 34 35 +1
Lines 2124 2292 +168
==========================================
+ Hits 1803 1976 +173
+ Misses 321 316 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, thanks @pem70 for your contribution! Left a few comments.
Co-authored-by: Timothy Johnson <[email protected]> Signed-off-by: pem70 <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]> Signed-off-by: pem70 <[email protected]>
Co-authored-by: Timothy Johnson <[email protected]> Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing! I don't find an urgent need for fixing these changes asap and they could be addressed in separate issues. However, if you think them should be done right now, I can still do it.
Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solve the bug in RegisterLogger(name: str)
Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, thanks @pem70! I left a couple comments regarding error messaging
@@ -49,6 +53,7 @@ def load_secure_props() -> None: | |||
return | |||
|
|||
except Exception as exc: | |||
CredentialManager.__logger.error(f"Fail to load secure profile {constants['ZoweServiceName']}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CredentialManager.__logger.error(f"Fail to load secure profile {constants['ZoweServiceName']}") | |
CredentialManager.__logger.error(f"Failed to load secure profile {constants['ZoweServiceName']}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left one more comment that is optional, and will approve once Trae's comments have been addressed 😋
self.__logger = logging.getLogger(__name__) | ||
Log.registerLogger(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the registerLogger
function 👍 Sorry I wasn't very clear in my previous comment, but would it make sense to have the registerLogger
function return the same logger object that is returned by getLogger
? That would allow us to condense these 2 lines into just 1:
self.__logger = logging.getLogger(__name__) | |
Log.registerLogger(__name__) | |
self.__logger = Log.registerLogger(__name__) |
Co-authored-by: Trae Yelovich <[email protected]> Signed-off-by: pem70 <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]> Signed-off-by: pem70 <[email protected]>
Co-authored-by: Trae Yelovich <[email protected]> Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the comments!
Signed-off-by: pem70 <[email protected]>
Signed-off-by: pem70 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @pem70!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the logger implementation @pem70! 😁
What It Does
Add logger class to core SDK. Fix issue #185.
How to Test
Review Checklist
I certify that I have:
Additional Comments