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

Fix/logging #2118

Merged
merged 20 commits into from
Jun 19, 2023
Merged

Fix/logging #2118

merged 20 commits into from
Jun 19, 2023

Conversation

Gryfenfer97
Copy link
Contributor

@Gryfenfer97 Gryfenfer97 commented Jun 15, 2023

  • Add types to logging.py

  • remove self assignation when using addfile_handler and add_stdout_handler

  • Fix bug: Trying to instanciate a logger and redirect to a file with the default file name doesn't work

  • Fix check for hasHandlers

  • Fix call on _make_child_logger

* remove self assignation when using addfile_handler and add_stdout_handler
… with the default file name doesn't work

* Fix check for hasHandlers
@Gryfenfer97 Gryfenfer97 changed the title Fix/logging type Fix/logging Jun 15, 2023
@github-actions github-actions bot added the BUG Issue, problem or error in PyMAPDL label Jun 15, 2023
@Gryfenfer97 Gryfenfer97 marked this pull request as draft June 15, 2023 10:59
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #2118 (3301f4a) into main (09d55a4) will decrease coverage by 0.01%.
The diff coverage is 94.33%.

@@            Coverage Diff             @@
##             main    #2118      +/-   ##
==========================================
- Coverage   86.43%   86.43%   -0.01%     
==========================================
  Files          45       45              
  Lines        7971     7985      +14     
==========================================
+ Hits         6890     6902      +12     
- Misses       1081     1083       +2     

@Gryfenfer97 Gryfenfer97 marked this pull request as ready for review June 16, 2023 10:11
@Gryfenfer97 Gryfenfer97 requested a review from germa89 June 16, 2023 11:09
Copy link
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions regarding:

Add types to logging.py

Good job!

remove self assignation when using addfile_handler and add_stdout_handler

I understand those assignations were redundant.

Fix bug: Trying to instantiate a logger and redirect to a file with the default file name doesn't work

Do you mean this line to_file or filename != FILE_NAME: ??

Fix check for hasHandlers

Thank you!

Fix call on _make_child_logger

This is the same as Fix check for hasHandlers, am I right?

@Gryfenfer97
Copy link
Contributor Author

Fix bug: Trying to instantiate a logger and redirect to a file with the default file name doesn't work

Do you mean this line to_file or filename != FILE_NAME: ??

Exactly, yes

Fix call on _make_child_logger

This is the same as Fix check for hasHandlers, am I right?

Not really, L488 you called self._make_child_logger and passed it self as a first argument which wasn't expected

@germa89 germa89 self-requested a review June 19, 2023 09:48
Copy link
Collaborator

@germa89 germa89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you Jamil!

@Gryfenfer97 Gryfenfer97 merged commit 2342e2e into main Jun 19, 2023
22 checks passed
@Gryfenfer97 Gryfenfer97 deleted the fix/logging-type branch June 19, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Issue, problem or error in PyMAPDL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants