Hi Team, Is there any way to set the name of the l...
# troubleshooting
a
Hi Team, Is there any way to set the name of the log file for flink JM and TM. I was able to find the env variable to change the default directory for logging(
env.log.dir
) but couldnt find out the respective variable for log file name.
c
You can set the file name (pattern) in the log4j config.
Copy code
appender.main.fileName = ${sys:log.file}
appender.main.filePattern = ${sys:log.file}.%i
Mind you that changing this here will likely break the log display in the UI, since that relies on the
log.file
system property which is hard-coded in the startup scripts.
a
Thanks, This is really helpful!
Also, after doing the said changes, i am able to see new file name under logs for task manager on ui, but cant see any log file for JM on UI. Is this expected?
c
It's not surprising, let's put it like that. The log display works quite differently between the JM and TM.
I expected the JM display to now work since IIRC it relies entirely on the
log.file
property, but I wasnt sure whether the TM display would be affected.
a
Ohhhh Got it! Thanks