Report question

Question: How do I log errors and warnings into a file?