Sitelet https://web.archive.org/web/20200601020916/https://github.com/PrefectHQ/prefect/issues/2256
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

Cloud handler always sets level to DEBUG #2256

Open
kchaliki opened this issue Apr 2, 2020 · 6 comments
Open

Cloud handler always sets level to DEBUG #2256

kchaliki opened this issue Apr 2, 2020 · 6 comments

Comments

@kchaliki
Copy link

@kchaliki kchaliki commented Apr 2, 2020

Description

A clear description of the bug

It looks like when logging to cloud, the log level config is ignored and the level is fixed to debug in the code (prefect/utilities/logging.py:208). Not that upon construction of the hander it actually reads the config but the harcoding is done straight after.

Expected Behavior

What did you expect to happen instead?

The log level config to be respected.

Reproduction

A minimal example that exhibits the behavior.

Environment

Any additional information about your environment

Optionally run prefect diagnostics from the command line and paste the information here

@joshmeek
Copy link
Member

@joshmeek joshmeek commented Apr 3, 2020

Thanks for opening the issue @kchaliki! I think we should update that line to respect the level set by config.logging.level similar to how the normal logger does 👍

@lauralorenz
Copy link
Collaborator

@lauralorenz lauralorenz commented Apr 21, 2020

@kchaliki talking about this more with the core team this is not as trivial to implement for all distributed agents to honor from config; is there a specific use case that filtering the debug logs from the UI in cloud isn't good enough for?

@kchaliki
Copy link
Author

@kchaliki kchaliki commented Apr 21, 2020

Hi @lauralorenz I am sure we can get by with the UI filter. I just thought streaming debug logs, particularly from all sorts of libraries people use, might put unnecessary stress on the system, obviously having to click around every time to filter is also a minor nuisance but definitely not a priority.

@arlobryer
Copy link

@arlobryer arlobryer commented May 7, 2020

Hi @lauralorenz - a good example of a use-case where it would be nice to have this is when trying to debug something where it's sensible to locally log potentially sensitive information that shouldn't be leaked through the logs when running through Cloud.

@cicdw
Copy link
Member

@cicdw cicdw commented May 7, 2020

@arlobryer - in that case it would be safer to use --no-cloud-logs on your agent so that no logs get shipped to Cloud for the duration of the run instead of relying on logging levels.

@lauralorenz
Copy link
Collaborator

@lauralorenz lauralorenz commented May 7, 2020

Thanks @arlobryer for the use case; RT on the --no-cloud-logs as the absolute safest route, and FWIW there is some work going on by a contributor you might be interested in at #2160 regarding the specific case of still wanting most cloud logs, just not the PII in them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.