diff options
author | Tomi Juvonen <tomi.juvonen@nokia.com> | 2016-12-08 07:33:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-08 07:33:51 +0000 |
commit | 75f48053575ebb04b7516016421c41c2a02f63cb (patch) | |
tree | da48d4c0ed3108a7ebadf491b232dfb244612ae8 /tests/consumer.py | |
parent | 2f60002bba5dd4d2c2071af6acf4f56e87fc13cc (diff) | |
parent | b7b37cfd508ca612c217e802b38b7a50d04e7e7e (diff) |
Merge "remove `Debug = True when run Flask and add logger"
Diffstat (limited to 'tests/consumer.py')
-rw-r--r-- | tests/consumer.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/consumer.py b/tests/consumer.py index 9b3230fe..3c012b4f 100644 --- a/tests/consumer.py +++ b/tests/consumer.py @@ -11,17 +11,20 @@ import argparse from flask import Flask from flask import request import json +import logger as doctor_log import os import time +LOG = doctor_log.Logger('doctor_consumer').getLogger() + app = Flask(__name__) @app.route('/failure', methods=['POST']) def event_posted(): - app.logger.debug('doctor consumer notified at %s' % time.time()) - app.logger.debug('received data = %s' % request.data) + LOG.info('doctor consumer notified at %s' % time.time()) + LOG.info('received data = %s' % request.data) d = json.loads(request.data) return "OK" @@ -35,7 +38,7 @@ def get_args(): def main(): args = get_args() - app.run(host="0.0.0.0", port=args.port, debug=True) + app.run(host="0.0.0.0", port=args.port) if __name__ == '__main__': |