python logging handler for mongo database