Repository: apache/flink
File: flink-python/src/main/java/org/apache/flink/python/PythonOptions.java (Java)

Code before:
                    .defaultValue(1000)
                    .withDescription(
                            "The maximum number of the MapState keys/entries sent to Python UDF worker "
                                    + "in each batch when iterating a Python MapState. Note that this is an experimental flag "
                                    + "and might not be available "
                                    + "in future releases.");

    /** Specify the python runtime execution mode. */
    @Experimental
    public static final ConfigOption<String> PYTHON_EXECUTION_MODE =
            ConfigOptions.key("python.execution-mode")
                    .stringType()
                    .defaultValue("process")
                    .withDescription(
                            "Specify the python runtime execution mode. The optional values are `process` and `thread`. "
                                    + "The `process` mode means that the Python user-defined functions will be executed in separate Python process. "
                                    + "The `thread` mode means that the Python user-defined functions will be executed in the same process of the Java operator. "
                                    + "Note that currently it still doesn't support to execute Python user-defined functions in `thread` mode in all places. "
                                    + "It will fall back to `process` mode in these cases.");

    public static final ConfigOption<String> PYTHON_DEFAULT_LOGGING_LEVEL =
            ConfigOptions.key("python.default.logging.level")
                    .stringType()
                    .defaultValue("INFO")
                    .withDescription(
                            "Controls the default log level of python loggers without a log level override.");

    public static final ConfigOption<Map<String, String>> PYTHON_LOGGING_LEVEL_OVERRIDE =
            ConfigOptions.key("python.logging.level.overrides")
                    .mapType()
                    .noDefaultValue()
                    .withDescription(
                            "This option controls the log levels for specifically named loggers. "
                                    + "The expected format is \"Name: LogLevel...\". Supports a logging "
                                    + "hierarchy based off of names that are '.' separated. For example, by specifying the value "
                                    + "\"a.b.c.Foo: DEBUG\", the logger for the class 'a.b.c.Foo' will be configured to "
                                    + "output logs at the DEBUG level. Similarly, by specifying the value \"a.b.c:WARN\", "
                                    + "all loggers underneath the 'a.b.c' package will be configured to output logs at the WARN "
                                    + "level. System.out and System.err levels are configured via loggers of the corresponding "
                                    + "name. Also, note that when multiple overrides are specified, the exact name followed by "
                                    + "the closest parent takes precedence.");

    // ------------------------------------------------------------------------------------------
    // config options used for internal purpose
    // ------------------------------------------------------------------------------------------

    @Documentation.ExcludeFromDocumentation(
            "Internal use only. The options will be exported as environment variables which could be accessed in Python worker process.")
    public static final ConfigOption<Map<String, String>> PYTHON_JOB_OPTIONS =
            ConfigOptions.key("python.job-options").mapType().noDefaultValue();


Review comment (bug):
What about update it as following:
```
Controls the default log level of python loggers, available values: OFF, ERROR, WARN, INFO, DEBUG, TRACE.
```

Code after:
                    .defaultValue(1000)
                    .withDescription(
                            "The maximum number of the MapState keys/entries sent to Python UDF worker "
                                    + "in each batch when iterating a Python MapState. Note that this is an experimental flag "
                                    + "and might not be available "
                                    + "in future releases.");

    /** Specify the python runtime execution mode. */
    @Experimental
    public static final ConfigOption<String> PYTHON_EXECUTION_MODE =
            ConfigOptions.key("python.execution-mode")
                    .stringType()
                    .defaultValue("process")
                    .withDescription(
                            "Specify the python runtime execution mode. The optional values are `process` and `thread`. "
                                    + "The `process` mode means that the Python user-defined functions will be executed in separate Python process. "
                                    + "The `thread` mode means that the Python user-defined functions will be executed in the same process of the Java operator. "
                                    + "Note that currently it still doesn't support to execute Python user-defined functions in `thread` mode in all places. "
                                    + "It will fall back to `process` mode in these cases.");

    public static final ConfigOption<String> PYTHON_LOGGING_DEFAULT_LEVEL =
            ConfigOptions.key("python.logging.default.level")
                    .stringType()
                    .defaultValue("INFO")
                    .withDescription(
                            "Controls the default log level of python loggers, available values: OFF, ERROR, WARN, INFO, DEBUG, TRACE.");

    public static final ConfigOption<Map<String, String>> PYTHON_LOGGING_LEVEL_OVERRIDE =
            ConfigOptions.key("python.logging.level.overrides")
                    .mapType()
                    .noDefaultValue()
                    .withDescription(
                            "This option controls the log levels for specifically named loggers. "
                                    + "The expected format is \"Name: LogLevel...\". Supports a logging "
                                    + "hierarchy based off of names that are '.' separated. For example, by specifying the value "
                                    + "\"a.b.c.Foo: DEBUG\", the logger for the class 'a.b.c.Foo' will be configured to "
                                    + "output logs at the DEBUG level. Similarly, by specifying the value \"a.b.c:WARN\", "
                                    + "all loggers underneath the 'a.b.c' package will be configured to output logs at the WARN "
                                    + "level. System.out and System.err levels are configured via loggers of the corresponding "
                                    + "name. Also, note that when multiple overrides are specified, the exact name followed by "
                                    + "the closest parent takes precedence.");

    // ------------------------------------------------------------------------------------------
    // config options used for internal purpose
    // ------------------------------------------------------------------------------------------

    @Documentation.ExcludeFromDocumentation(
            "Internal use only. The options will be exported as environment variables which could be accessed in Python worker process.")
    public static final ConfigOption<Map<String, String>> PYTHON_JOB_OPTIONS =
            ConfigOptions.key("python.job-options").mapType().noDefaultValue();