-
Notifications
You must be signed in to change notification settings - Fork 156
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
added option to handle logging scheme externally #173
Conversation
simulate=SIMULATE_API_CALLS, | ||
be_geo_id=BE_GEO_ID, | ||
caller=MERAKI_PYTHON_SDK_CALLER, | ||
inherit_logging_config= INHERIT_LOGGING_CONFIG, |
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.
Unnecessary space, will remove.
@@ -60,6 +61,7 @@ class AsyncDashboardAPI: | |||
- log_file_prefix (string): log file name appended with date and timestamp | |||
- print_console (boolean): print logging output to console? | |||
- suppress_logging (boolean): disable all logging? you're on your own then! | |||
- inherit_logging_config (boolean): Inherits you're own logging scheme |
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.
typo: should be your instead of you're. will fix
@@ -90,6 +92,7 @@ def __init__( | |||
be_geo_id=BE_GEO_ID, | |||
caller=MERAKI_PYTHON_SDK_CALLER, | |||
use_iterator_for_get_pages=False, | |||
inherit_logging_config=INHERIT_LOGGING_CONFIG |
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.
This can be at the same order in the kwarg list in both init files. Will fix.
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.
Thank you for this contribution. Left some comments on fixing this up, which I'll handle.
Some users might already use their own logging scheme defined as part of their workflow.
This way, we can consider and work with both cases. If the user has a logging scheme already setup, with their own handlers, formatters, etc, we just instantiate a logger and inherit the configs from the user's logging scheme.
If there's no inheritance, we use the current logic.