Flink isn't logging once we use RollingFileAppender

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Flink isn't logging once we use RollingFileAppender

Hussein Baghdadi
Hello,

We changed our log4j.properties file of our Flink cluster to:

log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/opt/flink/log/flink.log
log4j.appender.file.MaxFileSize=100MB
log4j.appender.file.MaxBackupIndex=2
log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n

After deployment, flink.log is empty although the cluster is under usage. Flink doesn't work with RollingFileAppender or something? Or we misconfiguring something?

Thanks for help and time.
Reply | Threaded
Open this post in threaded view
|

Re: Flink isn't logging once we use RollingFileAppender

Aljoscha Krettek
Hi,

I just tried this with your settings and it worked on my machine. Can your Flink processes write to the specified location? I think /opt might not be writable by your users. Maybe try putting something like /tmp/flink.log there.

Best,
Aljoscha

On 9. Aug 2017, at 16:45, Hussein Baghdadi <[hidden email]> wrote:

Hello,

We changed our log4j.properties file of our Flink cluster to:

log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/opt/flink/log/flink.log
log4j.appender.file.MaxFileSize=100MB
log4j.appender.file.MaxBackupIndex=2
log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n

After deployment, flink.log is empty although the cluster is under usage. Flink doesn't work with RollingFileAppender or something? Or we misconfiguring something?

Thanks for help and time.