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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Shang Yuanchun (Jira)
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)