How to write custom python logging handler?,logger.setLevel(logging.DEBUG)