Log rollover for logs.

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

Log rollover for logs.

John Smith
Hi, I'm running flink as a systemd service with...

[Service]
Type=forking
WorkingDirectory=/opt/flink
User=flink
Group=flink
ExecStart=/opt/flink/bin/taskmanager.sh start
ExecStop=/opt/flink/bin/taskmanager.sh stop
TimeoutSec=30
Restart=on-failure

My log4j.porperties file is at /opt/flink/conf

Is it as simple as just setting the log rollover in there? Cause sometimes with certain services like zookeeper some env variable overrides etc... So just wondering if it's that straight forward with flink.
Reply | Threaded
Open this post in threaded view
|

Re: Log rollover for logs.

Nicolaus Weidner
Hi John,

On Tue, Apr 27, 2021 at 9:47 AM John Smith <[hidden email]> wrote:
Hi, I'm running flink as a systemd service with...

[Service]
Type=forking
WorkingDirectory=/opt/flink
User=flink
Group=flink
ExecStart=/opt/flink/bin/taskmanager.sh start
ExecStop=/opt/flink/bin/taskmanager.sh stop
TimeoutSec=30
Restart=on-failure

My log4j.porperties file is at /opt/flink/conf

Is it as simple as just setting the log rollover in there? Cause sometimes with certain services like zookeeper some env variable overrides etc... So just wondering if it's that straight forward with flink.

yes, you can use the log4j RollingFileAppender [1] for this purpose. You can also find more information regarding logging in Flink in the docs [2]. 

Best regards,
Nico