Python script logging not working

I am using logger with the following code

import logging
logging.basicConfig(filename='/home/kamarjit/FacultyCV.log', filemode='w', level=logging.DEBUG)"testing")

the output goes only to the screen. The file is not created or written to. Can someone help?

You must be running your client in foreground mode, e.g. bin/instance fg

Try bin/instance start

maybe you have to set the "event-log-level" in your instance zope.conf file. this defaults to "INFO"