Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Excellent answer - this may be exactly what I need. I am actually using the logging module, but want to let the user have the option to redirect the output and get a human readable file. The log itself is created by the logging module (and with your approach I will most likely get what I want). Commented May 23, 2010 at 22:48
  • I just tested your approach and it works exactly as expected. Many thanks! Commented May 23, 2010 at 22:50