D
D
devrais2019-04-10 14:16:13
Django
devrais, 2019-04-10 14:16:13

Internal Server Error while setting up django logs?

Knocks out an error as I add to settings.
settings.py

...
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'file': {
            'level': 'DEBUG',
            'class': 'logging.FileHandler',
            'filename': 'home/django/pro/djangopt/log/debug.log', # путь до файла
        },
    },
    'loggers': {
        'django': {       #<-- Не совсем понял что это. Вроде как папку которую он будет смотреть(app) или файл.. (ставил blog все равно)-->
            'handlers': ['file'],
            'level': 'DEBUG', 
            'propagate': True,
        },
    },
}
...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2019-04-10
@devrais

'filename': '/home/django/pro/djangopt/log/debug.log'

K
Keofaste, 2019-04-10
@Keofaste

Add "/" to the beginning of the path, check if the folder "/home/django/pro/djangopt/log/" exists and has write permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question