You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Huang Xingbo (Jira)" <ji...@apache.org> on 2021/04/27 04:03:00 UTC

[jira] [Created] (FLINK-22487) Support `print` to print logs in PyFlink

Huang Xingbo created FLINK-22487:
------------------------------------

             Summary: Support `print` to print logs in PyFlink
                 Key: FLINK-22487
                 URL: https://issues.apache.org/jira/browse/FLINK-22487
             Project: Flink
          Issue Type: New Feature
          Components: API / Python
    Affects Versions: 1.14.0
            Reporter: Huang Xingbo
            Assignee: Huang Xingbo
             Fix For: 1.14.0


Currently, if users want to print logs, they need to use logging module.

{code:python}
@udf(result_type=DataTypes.BIGINT())
def add(i, j):
    import logging
    logging.info("debug")
    return i + j
{code}

It will be more convenient to use `print` to print logs.
{code: python}
@udf(result_type=DataTypes.BIGINT())
def add(i, j):
    print("debug")
    return i + j
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)