Skip to content

Commit

Permalink
access log
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Oct 30, 2023
1 parent c6e82a3 commit bb2c73f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@
def log_request_info():
app.logger.info(("{0} \"{1} {2}\"".format(request.remote_addr, request.method, request.url)))

# @app.after_request
# def access_log(response):
# app.logger.info(("{0} \"{1} {2}\" {3}\r\n".format(request.remote_addr, request.method, request.url, response.status_code)))
@app.after_request
def access_log(response):
app.logger.info(("{0} \"{1} {2}\" {3}\r\n".format(request.remote_addr, request.method, request.url, response.status_code)))
return response



# APIS: try to load new data, if doesn't work, get most recent
Expand Down

0 comments on commit bb2c73f

Please sign in to comment.