python logging wrapper