Skip to content

Commit

Permalink
update log.py to fit server deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-haoliu committed Apr 13, 2020
1 parent 87e03b8 commit b32aabc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/dquest-flask/app/templates/backup/
/dquest-flask/venv/
/dquest-flask/app/lib/log.py
4 changes: 2 additions & 2 deletions dquest-flask/app/lib/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ def logger (name):
formatter = logging.Formatter('[%(asctime)s %(levelname)s] %(message)s', "%d-%m-%Y %H:%M:%S")

# info
hfile_info = logging.FileHandler("D:/pycharm_projects/dquest-flask/app/log/dquest-info.log")
hfile_info = logging.FileHandler("/var/www/dquest-flask/app/log/dquest-info.log")
hfile_info.setFormatter(formatter)
hfile_info.setLevel(logging.INFO)
log.addHandler(hfile_info)

# error
hfile_error = logging.FileHandler("D:/pycharm_projects/dquest-flask/app/log/dquest-error.log")
hfile_error = logging.FileHandler("/var/www/dquest-flask/app/log/dquest-error.log")
hfile_error.setFormatter(formatter)
hfile_error.setLevel(logging.ERROR)
log.addHandler(hfile_error)
Expand Down

0 comments on commit b32aabc

Please sign in to comment.