Hi Bajaj,
I am not entirely sure what is the actual issue you are seeking help, but let me comment on your observations.
Ad. 1
If you log to the console from the main method this is an
expected behavior in both cases (log4j, logback). The std out is
being overwritten for the execution of the main method
If you log to a file logs should work in both cases. I checked
that myself and actually the logs appeared in the jobmanager logs
as long as they are executed before the env.execute(). I observed
though weird behavior of the Web UI, as it does not always update
the logs that are displayed. How did you check the logs? If you
checked through the Web UI could you try to check the file
directly?
Ad. 2 Yes this is expected. Operators are executed on taskmanager and that's why they log there.
Ad. 3 See Ad. 1
Best,
Dawid
Hi Bajaj,
>> Logs from main method(outside of job graph) do not show up in jobmanager logs.
IMO, it's normal phenomena.
Other ideas, please check the JVM options mentioned by Yang.
Best,Vino
Yang Wang <[hidden email]> 于2020年1月6日周一 上午11:18写道:
Hi Bajaj, Abhinav,
Could you share the start-command of jobmanager and taskmanager. If it is started correctly, wewill have a the following jvm options.
-Dlog.file=/path/of/taskmanager.log -Dlogback.configurationFile=file:///path/of/logback.xml
Best,Yang
Bajaj, Abhinav <[hidden email]> 于2020年1月4日周六 上午7:23写道:
Hi,
I am investigating a logging issue with Flink.
Setup
- Using Flink-1.7.1 using logback as suggested in Flink documentation here.
- Submitting the Flink job from the Flink dashboard.
Observations
- Logs from main method(outside of job graph) do not show up in jobmanager logs.
- Logs from the operators like map or custom operators do show up in the taskmanager logs.
- Logs from main method do show up in jobmanager logs when using log4j in place of logback.
Has anyone else noticed similar behavior or is this a known issue with logback integration in Flink?
Any suggestions on potential workaround or fix?
Appreciate your time and help.
~ Abhinav Bajaj
Free forum by Nabble | Edit this page |