Skip to content

Support Netty Logging at the network layer #378

@SteNicholas

Description

@SteNicholas

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Support Netty level logging at the network layer for Fluss.

Solution

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:

Anything else?

No response

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions