Skip to content

Conversation

@SteNicholas
Copy link
Member

@SteNicholas SteNicholas commented Feb 11, 2025

Purpose

Linked issue: close #378

Support Netty level logging at the network layer for Fluss. To configure Netty level logging a LogHandler must be added to the channel pipeline. NettyLogger is introduced as a new class which is able to construct a log handler depending on the log level:

  • In case of <Logger name="com.alibaba.fluss.rpc.netty.NettyLogger;" level="DEBUG" additivity="false">: a custom log handler is created which does not dump the message contents. This way the log is a bit more compact. Moreover when network level encryption is switched on this level might be sufficient.
  • In case of <Logger name="com.alibaba.fluss.rpc.netty.NettyLogger" level="TRACE" additivity="false">: Netty's own log handler is used which dumps the message contents.
  • Otherwise (when the logger is not TRACE or DEBUG) the pipeline does not contain a log handler (there is no runtime penalty for the default setting but a long running service must be restarted along with the new log level to have an effect).

Backport:

This level of logging proved to be sufficient during debugging some external related problem. Compared with the tcpdump this log lines can be more easily correlated with the Fluss internal calls. Moreover the log layout can be configured to contain the thread names that way for a timeout a busy thread could be identified.

Tests

No.

API and Format

No.

Documentation

No.

@SteNicholas
Copy link
Member Author

Ping @wuchong.

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature! LGTM.

@wuchong wuchong merged commit 85a8d50 into apache:main Feb 13, 2025
2 checks passed
ZmmBigdata pushed a commit to ZmmBigdata/fluss that referenced this pull request Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Netty Logging at the network layer

2 participants