'set stream handler
:param level:
:return:'

def __setStreamHandler__(self, level=None):

    stream_handler = logging.StreamHandler()
    formatter = logging.Formatter('%(asctime)s    %(filename)s[line:%(lineno)d]    %(levelname)s    %(message)s')
    stream_handler.setFormatter(formatter)
    if (not level):
        stream_handler.setLevel(self.level)
    else:
        stream_handler.setLevel(level)
    self.addHandler(stream_handler)
