class_docstr: FileTaskHandler is a python log handler that handles and reads task instance logs.
  
  It creates and delegates log handling to `logging.FileHandler` after receiving task
  instance context.  It reads logs from task instance's host machine.
  
  :param base_log_folder: Base log folder to place logs.
  :param filename_template: template filename string
class_docstr_tok: ["FileTaskHandler","is","a","python","log","handler","that","handles","and","reads","task","instance","logs",".","It","creates","and","delegates","log","handling","to","`","logging.FileHandler","`","after","receiving","task","instance","context",".","It","reads","logs","from","task","instance","'s","host","machine",".",":","param","base_log_folder",":","Base","log","folder","to","place","logs",".",":","param","filename_template",":","template","filename","string"]
code: def __init__(
      self, base_log_folder: str, filename_template: str | None = None
  ):
      super().__init__()
      self.handler: logging.Handler | None = None
      self.local_base = base_log_folder
      if filename_template is not None:
          warnings.warn(
              "Passing filename_template to a log handler is deprecated and has no effect",
              RemovedInAirflow3Warning,
              # We want to reference the stack that actually instantiates the
              # handler, not the one that calls super()__init__.
              stacklevel=(2 if type(self) == FileTaskHandler else 3),
          )
      self.maintain_propagate: bool = False
      """
          If true, overrides default behavior of setting propagate=False
  
          :meta private:
          """
  
      self.ctx_task_deferred = False
      """
          If true, task exited with deferral to trigger.
  
          Some handlers emit "end of log" markers, and may not wish to do so when task defers.
          """
  
imports: from __future__ import annotations
  import inspect
  import logging
  import os
  import warnings
  from contextlib import suppress
  from enum import Enum
  from functools import cached_property
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Iterable
  from urllib.parse import urljoin
  import pendulum
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.utils.context import Context
  from airflow.utils.helpers import parse_template_string, render_template_to_string
  from airflow.utils.log.logging_mixin import SetContextPropagate
  from airflow.utils.log.non_caching_file_handler import NonCachingFileHandler
  from airflow.utils.session import create_session
  from airflow.utils.state import State, TaskInstanceState
label_desc: Use image node_id 1 to create a new FileTaskHandler object from inherited base classes: logging with example: obj = FileTaskHandler(base_log_folder, filename_template)