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"]
docstr: Derive trigger log filename from task log filename.
  
  E.g. given /path/to/file.log returns /path/to/file.log.trigger.123.log, where 123
  is the triggerer id.  We use the triggerer ID instead of trigger ID to distinguish
  the files because, rarely, the same trigger could get picked up by two different
  triggerer instances.
docstr_tok: ["Derive","trigger","log","filename","from","task","log","filename",".","E.g",".","given","\/path\/to\/file.log","returns","\/path\/to\/file.log.trigger.123.log",",","where","123","is","the","triggerer","id",".","We","use","the","triggerer","ID","instead","of","trigger","ID","to","distinguish","the","files","because",",","rarely",",","the","same","trigger","could","get","picked","up","by","two","different","triggerer","instances","."]
code: def add_triggerer_suffix(full_path, job_id=None):
      """
      Derive trigger log filename from task log filename.
  
      E.g. given /path/to/file.log returns /path/to/file.log.trigger.123.log, where 123
      is the triggerer id.  We use the triggerer ID instead of trigger ID to distinguish
      the files because, rarely, the same trigger could get picked up by two different
      triggerer instances.
      """
      full_path = Path(full_path).as_posix()
      full_path += f".{LogType.TRIGGER.value}"
      if job_id:
          full_path += f".{job_id}.log"
      return full_path
  
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 4 for calling the FileTaskHandler obj's underlying member method code with example usage: obj.add_triggerer_suffix(full_path, job_id) and returns: full_path