class_docstr: Logger class
class_docstr_tok: ["Logger","class"]
docstr: Set the save_logs flag
docstr_tok: ["Set","the","save_logs","flag"]
code: def save_logs(self, save_logs: bool):
      """Set the save_logs flag"""
      if save_logs and not self.save_logs:
          filaname = find_closest("pandasai.log")
          self._logger.addHandler(logging.FileHandler(filaname))
      elif not save_logs and self.save_logs:
          # remove the FileHandler if it exists
          for handler in self._logger.handlers:
              if isinstance(handler, logging.FileHandler):
                  self._logger.removeHandler(handler)
  
file_path: pandas-ai/pandasai/helpers/logger.py
imports: import inspect
  import time
  import sys
  from typing import List
  import logging
  from .path import find_closest
  from pydantic import BaseModel
label_desc: Use image node_id 9 for calling the Logger obj's underlying member method code with example usage: obj.save_logs(save_logs) without return types