def setup_task_logging_for_files
      log_dir = File.join(Config.base_dir, 'tasks', @task_id.to_s)
      FileUtils.mkdir_p(log_dir)

      debug_log = File.join(log_dir, 'debug')

      @task_logger = Logging::Logger.new('DirectorJobRunner')
      shared_appender = Logging.appenders.file(
        'DirectorJobRunnerFile',
        filename: debug_log,
        layout: ThreadFormatter.layout,
        filters: [Bosh::Common::Logging.null_query_filter],
      )
      @task_logger.add_appenders(shared_appender)
      @task_logger.level = Config.logger.level

      Config.logger = @task_logger

      Config.db.logger = @task_logger
      Config.dns_db.logger = @task_logger if Config.dns_db

      cpi_log = File.join(log_dir, 'cpi')
      Config.cloud_options['properties'] ||= {}
      Config.cloud_options['properties']['cpi_log'] = cpi_log
    end
def setup_task_logging_for_files
      log_dir = File.join(Config.base_dir, 'tasks', @task_id.to_s)
      FileUtils.mkdir_p(log_dir)

      debug_log = File.join(log_dir, 'debug')

      @task_logger = Logging::Logger.new('DirectorJobRunner')
      shared_appender = Logging.appenders.file(
        'DirectorJobRunnerFile',
        filename: debug_log,
        layout: ThreadFormatter.layout,
        filters: [Bosh::Common::Logging.null_query_filter],
      )
      @task_logger.add_appenders(shared_appender)
      @task_logger.level = Config.logger.level

      Config.logger = @task_logger

      Config.db.logger = @task_logger
      Config.dns_db.logger = @task_logger if Config.dns_db

      cpi_log = File.join(log_dir, 'cpi')
      Config.cloud_options['properties'] ||= {}
      Config.cloud_options['properties']['cpi_log'] = cpi_log
    end
Sets up job logging.
 @return [void]