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

Unexpected value in configuration #96

Open
adamrothman opened this issue Sep 11, 2017 · 1 comment
Open

Unexpected value in configuration #96

adamrothman opened this issue Sep 11, 2017 · 1 comment

Comments

@adamrothman
Copy link
Contributor

Lately I've been getting log lines like these when I start up an app using staticconf:

[2017-09-11 01:00:27,865 INFO staticconf.config] Unexpected value in moneybot configuration: [('postgres.host', 'localhost'), ('postgres.port', 5432), ('postgres.username', 'postgres'), ('postgres.password', 'secretpass'), ('postgres.dbname', 'postgres')]

What's causing this? Why are these values unexpected? How do I make them expected?

Environment

  • PyStaticConfiguration 0.10.3
  • Python 3.6.2
  • macOS 10.12.6 and Ubuntu 17.04
@dnephin
Copy link
Owner

dnephin commented Sep 11, 2017

Values are expected when getters or a schema are defined and called before configuration is loaded. If you use readers or getters/schema after loading the configuration then you'll get this log message.

If you want to ignore the message it's at INFO level, so you can ignore it with logging.getLogger('staticconf.config').setLevel(logging.WARN)

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

2 participants