Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-22487

Support `print` to print logs in PyFlink

    XMLWordPrintableJSON

Details

    Description

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

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

      It will be more convenient to use `print` to print logs.

      Unable to find source-code formatter for language: python. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      @udf(result_type=DataTypes.BIGINT())
      def add(i, j):
          print("debug")
          return i + j
      

      Attachments

        Issue Links

          Activity

            People

              hxbks2ks Huang Xingbo
              hxbks2ks Huang Xingbo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: