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

[FEATURE] Is there an option to disable this caching output to stdout while accessing SDK #184

Open
gopurx opened this issue Oct 11, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@gopurx
Copy link

gopurx commented Oct 11, 2024

Problem Statement
Is there an option to disable this caching output to stdout while accessing SDK
WARNING - Saving to cache.

Proposed Solution
option to disable this echo, as this could be noisy during automation and invoking 10s of methods for 100s of resources

Additional Context
Add any other context, references or screenshots about the feature request here.

@willguibr
Copy link
Member

@gopurx There's is no exposed option today to simply disable the stdout.
This output is only presented if you are executing your code in debug mode i.e
ZSCALER_SDK_LOG - Turn on logging
ZSCALER_SDK_VERBOSE - Turn on logging in verbose mode
Which we do not recommend for any production environments.
If you are running as a development in your local environment, you can simply remove or comment the following lines
logging.debug("Serving from cache.") in the no_op_cache.py file and recompile the package again.

Zscaler DevRel

@willguibr willguibr self-assigned this Oct 11, 2024
@willguibr willguibr added the question Further information is requested label Oct 11, 2024
@willguibr willguibr moved this to ⚙️ In development in Zscaler Automation Dashboard 🛣 Oct 11, 2024
@gopurx
Copy link
Author

gopurx commented Oct 11, 2024

Every time an SDK is referred, we are getting this trace of line which is not of use as much. It would be easy if there is an option to disable this or redirect to a file.

"2024-10-11 10:06:45,115 - WARNING - Saving to cache.
2024-10-11 10:06:47,089 - WARNING - Saving to cache.
2024-10-11 10:06:49,242 - WARNING - Saving to cache.
2024-10-11 10:06:52,929 - WARNING - Saving to cache.
2024-10-11 10:06:54,951 - WARNING - Saving to cache.
2024-10-11 10:06:56,277 - WARNING - Saving to cache.
2024-10-11 10:06:58,323 - WARNING - Saving to cache.
2024-10-11 10:07:03,183 - WARNING - Saving to cache.
2024-10-11 10:07:13,302 - WARNING - Saving to cache.
2024-10-11 10:07:14,389 - WARNING - Saving to cache.
2024-10-11 10:07:16,453 - WARNING - Saving to cache.

@willguibr
Copy link
Member

Ok as I said this is only shown if you're running the SDK in debug mode, which we do not recommend.
We will implement an option to explicitly disable logging in the future.

@gopurx
Copy link
Author

gopurx commented Oct 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: ⚙️ In development
Development

No branches or pull requests

2 participants