Changed logs.csv location

This commit is contained in:
Timofey Mazurov 2021-03-17 16:16:09 +03:00
parent 96a618f1b5
commit 14cf635d3b
2 changed files with 2 additions and 2 deletions

2
.gitignore vendored
View File

@ -12,7 +12,7 @@ local_settings.py
db.sqlite3
db.sqlite3-journal
media/
logs.csv
logs/
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
# in your Git repository. Update and uncomment the following line accordingly.

View File

@ -450,7 +450,7 @@ def log(user, admin=0):
if not logger.hasHandlers():
dbhandler = DatabaseHandler()
csvformatter = CsvFormatter()
csvhandler = logging.FileHandler('logs.csv', "a")
csvhandler = logging.FileHandler('logs/logs.csv', "a")
csvhandler.setFormatter(csvformatter)
logger.addHandler(dbhandler)
logger.addHandler(csvhandler)