in reply to How to create a log file?
Your question is so general that I really don't know how to help you. Can you be more specific? In general you will need to write logging statements in your code - there are a bunch of modules and functions that facilitate that - first of which being: print().