[ 
https://issues.apache.org/jira/browse/FLINK-16478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099746#comment-17099746
 ] 

Xingxing Di edited comment on FLINK-16478 at 5/12/20, 11:53 AM:
----------------------------------------------------------------

Hi [~trohrmann], thanks for the comments, The earlier class design was  too 
complicated, I have updated it to simplify the design: [Flink should support 
dynamic log level 
setting|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY]

1. About the scope thing, i totaly agree with you, we can start with the 
cluster wide log level, I've edit the google doc as well.
 About the timer thing, i think a timer for reseting log level would be very 
helpful, user can simply config one time for a short time debug, no need to 
worry about forgetting to change it back. This referenced to the design of 
Apache Storm: 
[https://github.com/apache/storm/blob/master/docs/dynamic-log-level-settings.md]

2. Since flink already migrate to log4j2 , I think we should at least support 
log4j2 and log4j.(According to the current design, we can easily support 
logback as well.)
 As you said before, log4j2 do have different means to configure the log level 
depending on the log4j2 version, but I found the way to configure log level 
which in your shared link will support all the log4j2 version as i known. Here 
is the 
[Log4j2ConfigManager|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.gpmra3ql0940]
 which similar to storm's [LogConfigManager . 
|https://github.com/apache/storm/blob/master/storm-client/src/jvm/org/apache/storm/daemon/worker/LogConfigManager.java]I
 also added the [LogConfigManagerFactory 
|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.d9siisf8rvjt]
 to show how to detect the logging backend.

Compatibility:
 * For a unsupported logging backend, dynamic log level setting will not work, 
but cluster will work fine, since we do not depend on a specific implementation 
directly unless we detect an supported logging backend.
 * For an incompatible 
version([Log4j2ConfigManager|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.gpmra3ql0940]
 should work for all log4j2 versions, here we assume there is an unexpected 
case.), dynamic log level setting may not work properly, also flink logging 
system may not work properly either.

3. As above, i looked into the design of apache storm, seems storm only support 
log4j2. 

 

 


was (Author: dixingx...@yeah.net):
Hi [~trohrmann], thanks for the comments, The earlier design was  too 
complicated, I have updated it to simplify the design: [Flink should support 
dynamic log level 
setting|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY]

1. About the scope thing, i totaly agree with you, we can start with the 
cluster wide log level, I've edit the google doc as well.
 About the timer thing, i think a timer for reseting log level would be very 
helpful, user can simply config one time for a short time debug, no need to 
worry about forgetting to change it back. This referenced to the design of 
Apache Storm: 
[https://github.com/apache/storm/blob/master/docs/dynamic-log-level-settings.md]

2. Since flink already migrate to log4j2 , I think we should at least support 
log4j2 and log4j.(According to the current design, we can easily support 
logback as well.)
 As you said before, log4j2 do have different means to configure the log level 
depending on the log4j2 version, but I found the way to configure log level 
which in your shared link will support all the log4j2 version as i known. Here 
is the 
[Log4j2ConfigManager|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.gpmra3ql0940]
 which similar to storm's [LogConfigManager . 
|https://github.com/apache/storm/blob/master/storm-client/src/jvm/org/apache/storm/daemon/worker/LogConfigManager.java]I
 also added the [LogConfigManagerFactory 
|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.d9siisf8rvjt]
 to show how to detect the logging backend.

Compatibility:
 * For a unsupported logging backend, dynamic log level setting will not work, 
but cluster will work fine, since we do not depend on a specific implementation 
directly unless we detect an supported logging backend.
 * For an incompatible 
version([Log4j2ConfigManager|https://docs.google.com/document/d/1Q02VSSBzlZaZzvxuChIo1uinw8KDQsyTZUut6_IDErY/edit#heading=h.gpmra3ql0940]
 should work for all log4j2 versions, here we assume there is an unexpected 
case.), dynamic log level setting may not work properly, also flink logging 
system may not work properly either.

3. As above, i looked into the design of apache storm, seems storm only support 
log4j2. 

 

 

> add restApi to modify loglevel 
> -------------------------------
>
>                 Key: FLINK-16478
>                 URL: https://issues.apache.org/jira/browse/FLINK-16478
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / REST
>            Reporter: xiaodao
>            Priority: Minor
>
> sometimes we may need to change loglevel to get more information to resolved 
> bug, now we need to stop it and modify conf/log4j.properties and resubmit it 
> ,i think it's better to add rest api to modify loglevel.



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

Reply via email to