Logs not getting created in Django Project
<p>My Django project is not creating logs, this is the Logging info in my setting.py:</p>

<pre><code>LOGGING = {
    'version': 1,
     'disable_existing_loggers': False,
'handlers': {
     'file': {
        'level': 'DEBUG',
        'class': 'logging.FileHandler',
        'filename': '/home/bithu/bservice/bservice/logs/djangoLog.log',
    },
},
'loggers': {
    'django': {
        'handlers': ['file'],
        'level': 'DEBUG',
        'propagate': True,
    },
},}
</code></pre>

<p><code>and this is how I call it from my views.py:</code></p>

<p><code>import logging
logger = logging.getLogger(__name__)
from django.shortcuts import render
from django.http import HttpResponse</code></p>

<p><code>def test_view(request):
    #return 'OK'
    if request.method == 'POST':
        logger.info('checking')
    logger.info('checking')
    return HttpResponse('Testing  Web Service.......')</code></p>

<p>I have created the log files manually and given it 777 permission still the logs are not getting created .</p>

<p>Can somebody shed some light on it please.</p>

<p>Maybe you can try:</p>

<pre><code># rest of config
'loggers': {
'your_app_name': {
    'handlers': ['file'],
    'level': 'DEBUG',
    'propagate': True,
   },
},}
</code></pre>

python django python-2.7 logging