Skip to content

Commit

Permalink
Log errors in error.log
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavAndreasson committed Dec 29, 2023
1 parent fb9592e commit be536c3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions records2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,18 @@
},
},
"handlers": {
"file": {
"fileDebug": {
"level": "DEBUG",
"class": "logging.FileHandler",
"filename": os.path.join(BASE_DIR, "logs/debug.log"),
"formatter": "verbose",
},
"fileError": {
"level": "ERROR",
"class": "logging.FileHandler",
"filename": os.path.join(BASE_DIR, "logs/error.log"),
"formatter": "verbose",
},
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
Expand All @@ -124,7 +130,7 @@
"propagate": True,
},
"records": {
"handlers": ["file"],
"handlers": ["fileDebug", "fileError"],
"level": "DEBUG",
"propagate": True,
},
Expand Down

0 comments on commit be536c3

Please sign in to comment.