class_docstr: NNI remote logger
docstr: constructor
code: def __init__(
      self,
      syslog_host,
      syslog_port,
      tag,
      std_output_type,
      log_collection,
      trial_id=None,
      channel=None,
      log_level=logging.INFO,
  ):
      """
      constructor
      """
      logger_name = "nni_syslog_{}".format(tag)
      # to prevent multiple trial logged in same logger
      if trial_id is not None:
          logger_name = "{}_{}".format(logger_name, trial_id)
      self.logger = logging.getLogger(logger_name)
      self.log_level = log_level
      self.logger.setLevel(self.log_level)
      self.pipeReader = None
      self.handler = NNIRestLogHanlder(
          syslog_host, syslog_port, tag, trial_id, channel
      )
      self.logger.addHandler(self.handler)
      if std_output_type == StdOutputType.Stdout:
          self.orig_stdout = sys.__stdout__
      else:
          self.orig_stdout = sys.__stderr__
      self.log_collection = log_collection
  
imports: import os
  import sys
  import json
  import logging
  import logging.handlers
  import time
  import threading
  import re
  from datetime import datetime
  from enum import Enum, unique
  from logging import StreamHandler
  from queue import Queue
  from .rest_utils import rest_post
  from .url_utils import gen_send_stdout_url
  from .commands import CommandType
label_desc: Use image node_id 1 to create a new RemoteLogger object from inherited base classes: object with example: obj = RemoteLogger(syslog_host, syslog_port, tag, std_output_type, log_collection, trial_id, channel, log_level)