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

added option to handle logging scheme externally #173

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

GameMaster47
Copy link
Contributor

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.

simulate=SIMULATE_API_CALLS,
be_geo_id=BE_GEO_ID,
caller=MERAKI_PYTHON_SDK_CALLER,
inherit_logging_config= INHERIT_LOGGING_CONFIG,
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Collaborator

@TKIPisalegacycipher TKIPisalegacycipher left a 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.

@TKIPisalegacycipher TKIPisalegacycipher merged commit 12979a2 into meraki:master Feb 3, 2022
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