From commits-return-13052-archive-asf-public=cust-asf.ponee.io@airflow.incubator.apache.org Tue Mar 6 10:24:27 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DC783180652 for ; Tue, 6 Mar 2018 10:24:26 +0100 (CET) Received: (qmail 26985 invoked by uid 500); 6 Mar 2018 09:24:25 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 26976 invoked by uid 99); 6 Mar 2018 09:24:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2018 09:24:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 64E5BC0BFD for ; Tue, 6 Mar 2018 09:24:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -11.731 X-Spam-Level: X-Spam-Status: No, score=-11.731 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id zCky5yvdNWuK for ; Tue, 6 Mar 2018 09:24:24 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 984CE5F20B for ; Tue, 6 Mar 2018 09:24:23 +0000 (UTC) Received: (qmail 26953 invoked by uid 99); 6 Mar 2018 09:24:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2018 09:24:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B7916EEE38; Tue, 6 Mar 2018 09:24:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: fokko@apache.org To: commits@airflow.incubator.apache.org Message-Id: <555e955a1697470e90bc7a38aa04a15d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-airflow git commit: [AIRFLOW-2176] Change the way logging is carried out in BQ Get Data Operator Date: Tue, 6 Mar 2018 09:24:22 +0000 (UTC) Repository: incubator-airflow Updated Branches: refs/heads/master 587a14b26 -> 6344d1e1b [AIRFLOW-2176] Change the way logging is carried out in BQ Get Data Operator - Changed the way logging is implemented in `BigQueryGetDataOperator`. Changed `logging.info` to `self.log.info` Closes #3096 from kaxil/AIRFLOW-2176 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/6344d1e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/6344d1e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/6344d1e1 Branch: refs/heads/master Commit: 6344d1e1b1a72481060c44f602da57ba86964098 Parents: 587a14b Author: Kaxil Naik Authored: Tue Mar 6 10:24:17 2018 +0100 Committer: Fokko Driesprong Committed: Tue Mar 6 10:24:17 2018 +0100 ---------------------------------------------------------------------- airflow/contrib/operators/bigquery_get_data.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/6344d1e1/airflow/contrib/operators/bigquery_get_data.py ---------------------------------------------------------------------- diff --git a/airflow/contrib/operators/bigquery_get_data.py b/airflow/contrib/operators/bigquery_get_data.py index 4c12f01..019bb58 100644 --- a/airflow/contrib/operators/bigquery_get_data.py +++ b/airflow/contrib/operators/bigquery_get_data.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from airflow.contrib.hooks.bigquery_hook import BigQueryHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults @@ -86,9 +84,9 @@ class BigQueryGetDataOperator(BaseOperator): self.delegate_to = delegate_to def execute(self, context): - logging.info('Fetching Data from:') - logging.info('Dataset: %s ; Table: %s ; Max Results: %s', - self.dataset_id, self.table_id, self.max_results) + self.log.info('Fetching Data from:') + self.log.info('Dataset: %s ; Table: %s ; Max Results: %s', + self.dataset_id, self.table_id, self.max_results) hook = BigQueryHook(bigquery_conn_id=self.bigquery_conn_id, delegate_to=self.delegate_to) @@ -100,7 +98,7 @@ class BigQueryGetDataOperator(BaseOperator): max_results=self.max_results, selected_fields=self.selected_fields) - logging.info('Total Extracted rows: %s', response['totalRows']) + self.log.info('Total Extracted rows: %s', response['totalRows']) rows = response['rows'] table_data = []