The warning isn't strictly related to the UI; the logs can also be
accessed through the REST API.
I'd say disabling the logger is the easiest option, but you could also
set the log.file property and have it point to some text file.
On 24/08/2021 20:24, Nikola Hrusov wrote:
Hi Chesnay,
That is also what I did for the time being.
I just wanted to hear if there is a better (configurable) way of doing
this. I do not expect anybody to look into the Flink UI while the
tests run in a minicluster setup.
Thank you for your answer.
Regards
,
Nikola
On Tue, Aug 24, 2021 at 10:22 PM Chesnay Schepler <ches...@apache.org
<mailto:ches...@apache.org>> wrote:
It's not unusual for this warning to be logged.
You could always disable logging from the WebMonitorUtils:
logger.wmu.name <http://logger.wmu.name> =
org.apache.flink.runtime.webmonitor.WebMonitorUtils
logger.wmu.level = off
On 24/08/2021 18:10, Nikola Hrusov wrote:
Hello,
I am trying to manage logs better with flink, but I would need
some help. I think the information on the docs is a bit scarce in
terms of logging as there is not much information on how to
configure the different environments.
Currently I am trying to add proper logging to my tests. I am
running flink 1.13.2
By going to github, I copy/pasted the approach used in
flink-tests. In my test/resource I have created a file
named log4j2-test.properties and put the contents copy/pasted
from here:
https://github.com/apache/flink/blob/release-1.13/flink-tests/src/test/resources/log4j2-test.properties
<https://github.com/apache/flink/blob/release-1.13/flink-tests/src/test/resources/log4j2-test.properties>
The only thing I have changed is "rootLogger.level = OFF" to
"rootLogger.level = WARN" as I'd like to see WARN (and above) log
messages.
In my tests I use the MiniClusterWithClientResource as
a @ClassRule as described here:
https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/testing/#testing-flink-jobs
<https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/testing/#testing-flink-jobs>
My tests work fine and so does the logging, but I also see this a
lot in my logs:
2298 [main] WARN
org.apache.flink.runtime.webmonitor.WebMonitorUtils [] - Log
file environment variable 'log.file' is not set.
2302 [main] WARN
org.apache.flink.runtime.webmonitor.WebMonitorUtils [] -
JobManager log files are unavailable in the web dashboard. Log
file location not found in environment variable 'log.file' or
configuration key 'web.log.path'.
2533 [main] WARN
org.apache.flink.runtime.webmonitor.WebMonitorUtils [] - Log
file environment variable 'log.file' is not set.
2533 [main] WARN
org.apache.flink.runtime.webmonitor.WebMonitorUtils [] -
JobManager log files are unavailable in the web dashboard. Log
file location not found in environment variable 'log.file' or
configuration key 'web.log.path'.
which obviously is not ideal since it bloats the logging console.
How can I prevent this message being logged for every test?
I can also provide a SSCCE if needed.
Regards
,
Nikola