phi/src/phid

23 lines
549 B
Plaintext
Raw Normal View History

2017-12-23 14:44:16 +01:00
#!/usr/bin/env python3
2017-12-16 23:03:03 +01:00
from pprint import pformat as pp
from phi.config import get_config
from phi.logging import setup_logging, get_logger
from phi.app import setup_app, run_app
log = get_logger(__name__)
if __name__ == '__main__':
config_file, config = get_config()
# Beware that everything happened until now
# could not possibly get logged.
setup_logging(config.get('logging', {}))
log.info("Found configuration at '{}':\n{}"
.format(config_file, pp(config)))
app = setup_app(config)
run_app(app)