class_docstr: Logs the results of an attack to a file, or `stdout`.
class_docstr_tok: ["Logs","the","results","of","an","attack","to","a","file",",","or","`","stdout","`","."]
code: def log_attack_result(self, result):
      self.num_results += 1
      # if self.stdout and sys.stdout.isatty():
      self.fout.write(
          "-" * 45
          + " Result "
          + str(self.num_results)
          + " "
          + "-" * 45
          + "\n"
      )
      self.fout.write(result.__str__(color_method=self.color_method))
      self.fout.write("\n")
  
file_path: TextAttack/textattack/loggers/file_logger.py
imports: import os
  import sys
  import terminaltables
  from textattack.shared import logger
  from .logger import Logger
label_desc: Use image node_id 4 for calling the FileLogger obj's underlying member method code with example usage: obj.log_attack_result(result) without return types