Skip to content

Commit

Permalink
feat: parse LOG_LEVEL from .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
janezicmatej committed Dec 23, 2024
1 parent 9413126 commit 3e9eb34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example.dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ DB_PASSWORD=secret

# used in django
DJANGO_SETTINGS_MODULE=project.settings.local
LOG_LEVEL=DEBUG
SECRET_KEY=secret
# these default to db and 5432 in django, uncomment if need to be changed
# DB_HOST=db
Expand Down
2 changes: 2 additions & 0 deletions .env.example.prod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ DB_PASSWORD=secret
# used in django
DJANGO_SETTINGS_MODULE=project.settings.remote
SECRET_KEY=secret
# log level defaults to INFO
# LOG_LEVEL=INFO
# these default to db and 5432 in django, uncomment if need to be changed
# DB_HOST=db
# DB_PORT=5432
Expand Down
2 changes: 1 addition & 1 deletion project/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"root": {
"handlers": ["console"],
"level": "INFO",
"level": os.environ.get("LOG_LEVEL", "INFO"),
},
}

Expand Down

0 comments on commit 3e9eb34

Please sign in to comment.