diff options
author | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-04 17:38:12 +0300 |
---|---|---|
committer | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-07-04 17:38:12 +0300 |
commit | 928d11eca7c30be7df86b29cbc2cf063418e394a (patch) | |
tree | 574b86ce7acab91f027401fd26f0f763df2c02d7 | |
parent | 7165e1eba548cce55314e86f147192239e522e28 (diff) | |
download | wmf-ci-arch-928d11eca7c30be7df86b29cbc2cf063418e394a.tar.gz |
Change: shut up, Bottle
-rwxr-xr-x | api.py | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -283,11 +283,8 @@ def runcmd(cwd, argv, timeout): return True -def setup_logging(log_filename): - logging.basicConfig( - filename=log_filename, - level=logging.DEBUG, - format='%(asctime)s %(levelname)s %(message)s') +def setup_logging(): + logging.basicConfig(level=logging.DEBUG) logging.info('API server starting') @@ -305,10 +302,9 @@ def get_token_from_file(filename): def main(): args = sys.argv[1:] cmd = args.pop(0) - log_filename = args.pop(0) pubkey_filename = args.pop(0) - setup_logging(log_filename) + setup_logging() if cmd == 'controller': api = Controller() @@ -323,7 +319,7 @@ def main(): pubkey = get_key_from_file(pubkey_filename) api.setup(app, pubkey) try: - app.run(host=HOST, port=PORT) + app.run(host=HOST, port=PORT, quiet=True) except SystemExit as e: logging.info('Terminating normally') except Exception as e: |