Skip to content

Collect log in shutdown hook when useing log4j2 #2019

@LiebingYu

Description

@LiebingYu

Search before asking

  • I searched in the issues and found nothing similar.

Description

Log4j2 registers a shutdown hook to perform cleanup operations. However, in the JVM, the execution order of multiple shutdown hooks is not guaranteed. This may cause Log4j2's shutdown hook to run before Fluss's shutdown hook, resulting in logs emitted during Fluss's shutdown phase not being captured.

We can disable Log4j2's shutdown hook and instead shut it down manually using reflection.

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions