flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chet Masterson <chet.master...@yandex.com>
Subject Re: Log4J
Date Mon, 20 Feb 2017 04:41:35 GMT
<div>I read through the link you provided, Stephan. However, I am still confused. The
instructions mention specific jar files for Logback, I am not sure which of the log4j 2.x
jars I need to put in the the flink /lib directory. I tried various combinations of log4j-1.2-api-2.8.jar,
log4j-slf4j-impl-2.8.jar, log4j-to-slf4j-2.8.jar, and renamed the stock log4j-1.2.17.jar and
slf4j-log4j12-1.7.7.jar, but then the job manager would not start, and threw a 'NoClassDefFoundError:
org/apache/logging/log4j/LogManager'. And this is without deploying my job out there, so I
don't think any of the "Use Logback when running Flink out of the IDE / from a Java application"
section instructions are relevant.</div><div> </div><div>Can someone
be more specific how to do this? If I get it to work, I'll be happy to formally document it
in whatever format would help the project out long term.</div><div> </div><div>Thanks!</div><div> </div><div> </div><div>16.02.2017,
05:54, "Stephan Ewen" &lt;sewen@apache.org&gt;:</div><blockquote type="cite"><div>Hi!<div> </div><div>The
bundled log4j version (1.x) does not support that.</div><div> </div><div>But
you can replace the logging jars with those of a different framework (like log4j 2.x), which
supports changing the configuration without stopping the application.</div><div>You
don't need to rebuild flink, simply replace two jars in the "lib" folder (and update the config
file, because log4j 2.x has a different config format).</div><div> </div><div>This
guide shows how to swap log4j 1.x for logback, and you should be able to swap in log4j 2.x
in the exact same way.</div><div> </div><div><a href="https://ci.apache.org/projects/flink/flink-docs-release-1.2/monitoring/best_practices.html#use-logback-when-running-flink-on-a-cluster">https://ci.apache.org/projects/flink/flink-docs-release-1.2/monitoring/best_practices.html#use-logback-when-running-flink-on-a-cluster</a></div><div> </div><div> <div>On
Thu, Feb 16, 2017 at 5:20 AM, Chet Masterson <span>&lt;<a target="_blank" href="mailto:chet.masterson@yandex.com">chet.masterson@yandex.com</a>&gt;</span>
wrote:<blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Is
there a way to reload a log4j.properties file without stopping and starting the job server?</div></blockquote></div></div></div></blockquote>
View raw message