From commits-return-80657-archive-asf-public=cust-asf.ponee.io@airflow.apache.org Thu Dec 12 00:27:46 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 88F4D180638 for ; Thu, 12 Dec 2019 01:27:46 +0100 (CET) Received: (qmail 27535 invoked by uid 500); 12 Dec 2019 00:27:45 -0000 Mailing-List: contact commits-help@airflow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.apache.org Delivered-To: mailing list commits@airflow.apache.org Received: (qmail 27526 invoked by uid 99); 12 Dec 2019 00:27:45 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2019 00:27:45 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] [airflow] konqui0 commented on a change in pull request #6767: [AIRFLOW-6208] Implement fileno in StreamLogWriter Message-ID: <157611046572.6318.763742758344464344.gitbox@gitbox.apache.org> Date: Thu, 12 Dec 2019 00:27:45 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit konqui0 commented on a change in pull request #6767: [AIRFLOW-6208] Implement fileno in StreamLogWriter URL: https://github.com/apache/airflow/pull/6767#discussion_r356894253 ########## File path: airflow/utils/log/logging_mixin.py ########## @@ -116,6 +116,13 @@ def isatty(self): """ return False + def fileno(self): + """ + Returns the stdout file descriptor 1. + For compatibility reasons e.g python subprocess module stdout redirection. + """ + return 1 Review comment: Is there a way to identify if the stream is stderr within the StreamLogWriter? That's true, the only alternative I can think of would be creating a pipe, returning its fd and writing everything written to that pipe. I'm not sure if this would be an acceptable solution / workaround. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services