Skip to content

Commit

Permalink
feat: api 요청 로그 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
ybkang1108 committed Aug 1, 2024
1 parent 0286b37 commit be325e9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ db.sqlite3
venv/
mguvenv/
Python-3.12.0/
django.log
27 changes: 24 additions & 3 deletions mustgou/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@

CORS_ALLOWED_ORIGINS = config("CORS_ALLOWED_ORIGINS", default="").split(",")

CORS_ALLOW_METHODS = {
CORS_ALLOW_METHODS = (
"DELETE",
"GET",
"OPTIONS",
"PATCH",
"POST",
"PUT",
}
)

CORS_ALLOW_HEADERS = {
CORS_ALLOW_HEADERS = (
"accept",
"accept-encoding",
"authorization",
Expand All @@ -143,6 +143,27 @@
"user-agent",
"x-csrftoken",
"x-requested-with",
)


# API 로그 확인
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"file": {
"level": "DEBUG",
"class": "logging.FileHandler",
"filename": os.path.join(BASE_DIR, "django.log"),
},
},
"loggers": {
"django": {
"handlers": ["file"],
"level": "DEBUG",
"propagate": True,
},
},
}


Expand Down

0 comments on commit be325e9

Please sign in to comment.