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

Setup a logger method #126

Merged
merged 5 commits into from
Feb 1, 2024
Merged

Setup a logger method #126

merged 5 commits into from
Feb 1, 2024

Conversation

rukapse
Copy link
Collaborator

@rukapse rukapse commented Feb 1, 2024

PR Summary

Changes have been strictly in dnac.py

  • Supports logging using both
    self.log(message, 'INFO')
    self.dnac_file_logger.info(message)
  • Added a setup_logger method which configures the logger to the specified dnac_log_file_path and sets the logging level based on the specidied dnac_log_level. Also added the filename:function:lineno in the logger formatter directly, no need to add it in every message.
  • Have retained the def log() method for backward compatibility till we change the log lines in all the method
  • Also, handles the situation if dnac_log is False and we are using seld.dnac_file_logger directly.

@madhansansel madhansansel merged commit b7bad3e into madhansansel:main Feb 1, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants