Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Set the level of the logger "org.apache.flink.runtime" to DEBUG.

Code Block
titlerequest.json
{
	"loggerName": "org.apache.flink.runtime",
	"level": "DEBUG"
}

...

Response Payload: empty

Proposed Changes

In general, the aforementioned public REST API will be introduced. Besides that, the following two RPC methods are also introduced to support this feature.

RPCs

ResourceManagerGateway

Code Block
languagejava
titleResourceManagerGateway.java
public interface ResourceManagerGateway {


    /**
     * Changes the level of the logger at runtime.
     *
     * <p>By providing a {@code null} LogLevel, the previously-changed level is reverted to its
     * original value.
     *
     * @param loggerName the name of the logger
     * @param level the log level
     * @return future which is completed exceptionally if the operation fails
     */
    CompletableFuture<Void> changeLogLevel(String loggerName, @Nullable LogLevel level);
}


TaskExecutorGateway

Code Block
languagejava
titleTaskExecutorGateway.java
public interface TaskExecutorGateway {

    /**
     * Change the level of the logger at runtime.
     *
     * <p>By providing a {@code null} LogLevel, the previously-changed level is reverted to its
     * original value.
     *
     * @param loggerName the name of the logger
     * @param level the log level
     * @return future which is completed exceptionally if the operation fails
     */
    CompletableFuture<Void> changeLogLevel(String loggerName, @Nullable LogLevel level);
}



Although log4j2 is the default logging implementation that is included in the distribution libraries, other logging frameworks, including log4j1 and logback, are also recommended by the documentation "How to use logging". We need to have some kind of abstraction to not directly depend on the logging implementation. Provide interfaces that not only suit the currently supported ones but also logging frameworks developed in the futureDescribe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

Compatibility, Deprecation, and Migration Plan

...