class_docstr: Task log reader.
class_docstr_tok: ["Task","log","reader","."]
docstr: Get the log handler which is configured to read logs.
docstr_tok: ["Get","the","log","handler","which","is","configured","to","read","logs","."]
code: def log_handler(self):
      """Get the log handler which is configured to read logs."""
      task_log_reader = conf.get("logging", "task_log_reader")
  
      def handlers():
          """
          Yield all handlers first from airflow.task logger then root logger.
  
          Depending on whether we're in a running task, it could be in either of these locations.
          """
          yield from logging.getLogger("airflow.task").handlers
          yield from logging.getLogger().handlers
  
      return next(
          (h for h in handlers() if h.name == task_log_reader), None
      )
  
file_path: airflow/airflow/utils/log/log_reader.py
imports: from __future__ import annotations
  import logging
  import time
  from functools import cached_property
  from typing import TYPE_CHECKING, Iterator
  from airflow.configuration import conf
  from airflow.utils.helpers import render_log_filename
  from airflow.utils.log.logging_mixin import ExternalLoggingMixin
  from airflow.utils.session import NEW_SESSION, provide_session
  from airflow.utils.state import TaskInstanceState
label_desc: Use image node_id 3 for calling the TaskLogReader obj's underlying member method code with example usage: obj.log_handler() and returns: next