- Code: Select all
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename='/var/tmp/my.log', filemode='w')
logging.debug(" script initiated")
logging.debug(" log file %s opened with level = %s " % (LOGFILE, LOGLEVEL))
The log file gets created but has size = 0. I've checked the code for non-printing characters. I have vim set to expand tabs to spaces and verified all this with 'cat -vet'. The script is being run as root.
Just scratching my head on this one.