I'm trying to use the logging module in Python. This is my simple script
import logging
logging.basicConfig(filename = 'logging.log', format = '%(message)s', filemode = 'a', level = logging.DEBUG)
logging.info('some info')
It works when I run the script from a Python editor (I use Spyder), but it doesn't work if I try to run the script from terminal with:
python ~/PYTHON/untitled0.py
untitled0.py is the name of the script in my PYTHON folder. Am I doing something wrong?
I use Python 2.7.2+ with Ubuntu 11.10
logging.logfile?~/PYTHON? Or somewhere else?