Use logging
I like to write to a file sometimes, so I use the following in my .py settings
import logging logging.basicConfig( level = logging.INFO, format = '%(asctime)s %(levelname)s %(message)s', filename = '/tmp/djangoLog.log',)
and where I want to keep a journal:
import logging logging.info("Making the alpha-ldap connection");
then in /tmp/djangoLog.log I would see the line "Create alpha-ldap connection" e
source share