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

Allow to disable logger.info in method change_text_property #3351

Closed
amichel0205 opened this issue Aug 1, 2023 · 3 comments
Closed

Allow to disable logger.info in method change_text_property #3351

amichel0205 opened this issue Aug 1, 2023 · 3 comments
Assignees
Labels
enhancement New features or code improvements

Comments

@amichel0205
Copy link
Contributor

Description of the feature

In a script for creating a schematic using pyaedt, I have to create and modify like about 100 to 300 text. Method "change_text_property" is displaying 4 different message for each text modification, using logger.info, in pyaedt.log, resulting in 1000+ lines in pyaedt.log(maybe slow down the execution of the script aas well).

I suggest to add an optional boolean parameter loggerinfo to the method.
Default is true, setting this parameter to False will disable logger.info for the method

Steps for implementing the feature

def change_text_property(self, property_id, property_name, property_value, loggerinfo=True):
...
...
if loggerinfo:
self.logger.info("Property {} Changed correctly.".format(property_name))
return True

Useful links and references

No response

@amichel0205 amichel0205 added the enhancement New features or code improvements label Aug 1, 2023
@amichel0205 amichel0205 self-assigned this Aug 1, 2023
@MaxJPRey MaxJPRey changed the title Allo to disable logger.info in method change_text_property Allow to disable logger.info in method change_text_property Aug 1, 2023
@amichel0205
Copy link
Contributor Author

After discussing with Massimo we agreed that the best is to change self.logger.info("Property {} Changed correctly.".format(property_name)) with self.logger.debug("Property {} Changed correctly.".format(property_name)) as this information are mainly valuable for debugging.

@MaxJPRey
Copy link
Collaborator

MaxJPRey commented Aug 2, 2023

Agreed, no need to use the info() method here.

@gmalinve
Copy link
Contributor

Issued tackled in PR #3362 thus closing issue.

Thanks @amichel0205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

3 participants