def __init__(self, syslog_host, syslog_port, tag, std_output_type, log_collection, log_level=logging.INFO):
        '''
        constructor
        '''
        self.logger = logging.getLogger('nni_syslog_{}'.format(tag))
        self.log_level = log_level
        self.logger.setLevel(self.log_level)
        handler = NNIRestLogHanlder(syslog_host, syslog_port, tag)
        self.logger.addHandler(handler)
        if std_output_type == StdOutputType.Stdout:
            self.orig_stdout = sys.__stdout__
        else:
            self.orig_stdout = sys.__stderr__
        self.log_collection = log_collection
def __init__ ( self , syslog_host , syslog_port , tag , std_output_type , log_collection , log_level = logging . INFO ) : self . logger = logging . getLogger ( 'nni_syslog_{}' . format ( tag ) ) self . log_level = log_level self . logger . setLevel ( self . log_level ) handler = NNIRestLogHanlder ( syslog_host , syslog_port , tag ) self . logger . addHandler ( handler ) if std_output_type == StdOutputType . Stdout : self . orig_stdout = sys . __stdout__ else : self . orig_stdout = sys . __stderr__ self . log_collection = log_collection
constructor