code: def use_absl_log_file(self, program_name=None, log_dir=None):
      
      if FLAGS['logtostderr'].value:
        self.stream = sys.stderr
      else:
        self.start_logging_to_file(program_name=program_name, log_dir=log_dir)
docs: Conditionally logs to files, based on --logtostderr.