Skip to content

Commit

Permalink
fix: use builtin logger
Browse files Browse the repository at this point in the history
  • Loading branch information
evanshortiss authored Oct 12, 2023
1 parent b536435 commit 748c877
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions roshambo-ai/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@
from flask import Flask, jsonify, request
from prediction import predict

log_level = os.getenv("LOG_LEVEL", "INFO").upper()

application = Flask(__name__)

formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
handler = logging.StreamHandler()
handler.setFormatter(formatter)
application.logger.addHandler(handler)
application.logger.setLevel(log_level)

@application.route('/')
@application.route('/status')
def status():
logging.debug('responding OK to /status check')
application.logger.debug('responding OK to /status check')
return jsonify({'status': 'ok'})


Expand Down

0 comments on commit 748c877

Please sign in to comment.