1
2
3
4
5
To get access to underlying stream (filelike) object in Python's logging system:

logger.handlers[0].stream

You'll have to figure out which handler for a logger object you want. I've only got one in my sample code. This snipt allows one to pass this stream object into interfaces that are expecting a file object.