Repository: flink Updated Branches: refs/heads/master 3223a160f -> 7d66aaeb0
[FLINK-5192] [logging] Improve log config templates This closes #2899. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7d66aaeb Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7d66aaeb Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7d66aaeb Branch: refs/heads/master Commit: 7d66aaeb0fb52c5cd258e8b32ba8394eedd5d4ca Parents: bf859e7 Author: Ufuk Celebi <u...@apache.org> Authored: Tue Nov 29 17:14:23 2016 +0100 Committer: Ufuk Celebi <u...@apache.org> Committed: Thu Dec 1 10:44:23 2016 +0100 ---------------------------------------------------------------------- .../src/main/flink-bin/conf/log4j.properties | 14 +++++++++- flink-dist/src/main/flink-bin/conf/logback.xml | 28 +++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/7d66aaeb/flink-dist/src/main/flink-bin/conf/log4j.properties ---------------------------------------------------------------------- diff --git a/flink-dist/src/main/flink-bin/conf/log4j.properties b/flink-dist/src/main/flink-bin/conf/log4j.properties index 97ec653..8e00ce3 100644 --- a/flink-dist/src/main/flink-bin/conf/log4j.properties +++ b/flink-dist/src/main/flink-bin/conf/log4j.properties @@ -16,8 +16,20 @@ # limitations under the License. ################################################################################ +# This affects logging for both user code and Flink log4j.rootLogger=INFO, file +# Uncomment this if you want to _only_ change Flink's logging +#log4j.logger.org.apache.flink=INFO + +# The following lines keep the log level of common libraries/connectors on +# log level INFO. The root logger does not override this. You have to manually +# change the log levels here. +log4j.logger.akka=INFO +log4j.logger.org.apache.kafka=INFO +log4j.logger.org.apache.hadoop=INFO +log4j.logger.org.apache.zookeeper=INFO + # Log all infos in the given file log4j.appender.file=org.apache.log4j.FileAppender log4j.appender.file.file=${log.file} @@ -25,5 +37,5 @@ log4j.appender.file.append=false log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n -# suppress the irrelevant (wrong) warnings from the netty channel handler +# Suppress the irrelevant (wrong) warnings from the Netty channel handler log4j.logger.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, file http://git-wip-us.apache.org/repos/asf/flink/blob/7d66aaeb/flink-dist/src/main/flink-bin/conf/logback.xml ---------------------------------------------------------------------- diff --git a/flink-dist/src/main/flink-bin/conf/logback.xml b/flink-dist/src/main/flink-bin/conf/logback.xml index 1147a70..f3c4331 100644 --- a/flink-dist/src/main/flink-bin/conf/logback.xml +++ b/flink-dist/src/main/flink-bin/conf/logback.xml @@ -25,8 +25,34 @@ </encoder> </appender> + <!-- This affects logging for both user code and Flink --> <root level="INFO"> <appender-ref ref="file"/> </root> -</configuration> + <!-- Uncomment this if you want to only change Flink's logging --> + <!--<logger name="org.apache.flink" level="INFO">--> + <!--<appender-ref ref="file"/>--> + <!--</logger>--> + + <!-- The following lines keep the log level of common libraries/connectors on + log level INFO. The root logger does not override this. You have to manually + change the log levels here. --> + <logger name="akka" level="INFO"> + <appender-ref ref="file"/> + </logger> + <logger name="org.apache.kafka" level="INFO"> + <appender-ref ref="file"/> + </logger> + <logger name="org.apache.hadoop" level="INFO"> + <appender-ref ref="file"/> + </logger> + <logger name="org.apache.zookeeper" level="INFO"> + <appender-ref ref="file"/> + </logger> + + <!-- Suppress the irrelevant (wrong) warnings from the Netty channel handler --> + <logger name="org.jboss.netty.channel.DefaultChannelPipeline" level="ERROR"> + <appender-ref ref="file"/> + </logger> +</configuration>