code: def __init__(self, file):
      self.logger = logging.getLogger("myapp")
      self.hdlr = logging.FileHandler(file)
      self.formatter = logging.Formatter(
          "%(asctime)s %(levelname)s %(message)s"
      )
      self.hdlr.setFormatter(self.formatter)
      self.logger.addHandler(self.hdlr)
      self.logger.setLevel(logging.INFO)
  
imports: import logging
label_desc: Use image node_id 1 to create a new Logger object  with example: obj = Logger(file)