Skip to content

added option to handle logging scheme externally - #173

Merged
TKIPisalegacycipher merged 1 commit into
meraki:masterfrom
GameMaster47:master
Feb 3, 2022
Merged

added option to handle logging scheme externally#173
TKIPisalegacycipher merged 1 commit into
meraki:masterfrom
GameMaster47:master

Conversation

@GameMaster47

Copy link
Copy Markdown
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.

Comment thread meraki/__init__.py
simulate=SIMULATE_API_CALLS,
be_geo_id=BE_GEO_ID,
caller=MERAKI_PYTHON_SDK_CALLER,
inherit_logging_config= INHERIT_LOGGING_CONFIG,

Copy link
Copy Markdown
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.

Comment thread meraki/aio/__init__.py
- 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
Copy Markdown
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

Comment thread meraki/aio/__init__.py
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
Copy Markdown
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.

@TKIPisalegacycipher TKIPisalegacycipher left a comment

Copy link
Copy Markdown
Collaborator

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