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

Closed
kchaliki opened this issue Apr 2, 2020 · 7 comments
Closed

Cloud handler always sets level to DEBUG #2256

kchaliki opened this issue Apr 2, 2020 · 7 comments
Labels
good first issue This issue is good for newcomers logging Related to logging

Comments

@kchaliki
Copy link

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 joshmeek added logging Related to logging enhancement An improvement of an existing feature good first issue This issue is good for newcomers and removed enhancement An improvement of an existing feature labels Apr 3, 2020
@joshmeek
Copy link

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

@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

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

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 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

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

@joshmeek
Copy link

The default of DEBUG is no longer the case, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is good for newcomers logging Related to logging
Projects
None yet
Development

No branches or pull requests

5 participants