Skip to content

Commit

Permalink
Add datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdijk authored Mar 8, 2024
1 parent 5ad5746 commit e2c7f6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion narrowcast_content/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from logging import Formatter, FileHandler
from datetime import datetime

from flask import Flask, request, abort, session

Expand Down Expand Up @@ -72,6 +73,6 @@ def check_auth():

@app.after_request
def after_request(response):
timestamp = strftime('[%Y-%b-%d %H:%M]')
timestamp = datetime.now().strftime('[%Y-%b-%d %H:%M]')
logger.error('%s %s %s %s %s %s', timestamp, request.remote_addr, request.method, request.scheme, request.full_path, response.status)
return response

0 comments on commit e2c7f6e

Please sign in to comment.