Skip to content

Commit

Permalink
Custom formatter for console stream
Browse files Browse the repository at this point in the history
  • Loading branch information
willianantunes committed Apr 7, 2019
1 parent 6fa674c commit 3217e25
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions django_graphql_playground/settings.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
"""
Django settings for django_graphql_playground project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""

import os
from enum import Enum

Expand Down Expand Up @@ -145,9 +133,11 @@
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler"}},
"handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler", "formatter": "console"}},
"formatters": {"console": {"format": "%(asctime)s %(name)-12s %(levelname)-8s %(message)s"}},
"loggers": {
"app": {"level": os.getenv("PROJECT_LOG_LEVEL", "INFO"), "handlers": ["console"]},
"": {"level": os.getenv("ROOT_LOG_LEVEL", "INFO"), "handlers": ["console"]},
"app": {"level": os.getenv("PROJECT_LOG_LEVEL", "INFO"), "handlers": ["console"], "propagate": False},
"django": {"level": os.getenv("DJANGO_LOG_LEVEL", "INFO"), "handlers": ["console"]},
"django.db.backends": {"level": os.getenv("DJANGO_DB_BACKENDS_LOG_LEVEL", "INFO"), "handlers": ["console"]},
},
Expand Down

0 comments on commit 3217e25

Please sign in to comment.