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

Configuring through live object does not work #1143

Closed
occoder opened this issue Jun 14, 2019 · 2 comments
Closed

Configuring through live object does not work #1143

occoder opened this issue Jun 14, 2019 · 2 comments

Comments

@occoder
Copy link

occoder commented Jun 14, 2019

According to the guide
The configuration file is parsed when Prefect is first imported and is available as a live object in prefect.config. To access any value, simply use dot-notation (for example, prefect.config.tasks.defaults.checkpoint).
But after putting these lines before the flow.run(),

prefect.config.debug = 'True'
prefect.config.logging.level = 'DEBUG'

it does not take any effect on the logging message generation. The default INFO logging level persists.

@jlowin
Copy link
Member

jlowin commented Jun 14, 2019

Hi @occoder, the config object is made available for ease of reading the configuration, not writing it. Most configuration steps must take place on import, including logging. If you want to set the logging level, create a custom config at ~/.prefect/config.toml or set PREFECT__LOGGING__LEVEL=debug in your environment.

@jlowin jlowin closed this as completed Jun 14, 2019
@fkaleo
Copy link

fkaleo commented May 9, 2021

Using prefect.context.config instead of prefect.config seems to work.
See #1481

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

No branches or pull requests

3 participants