[rpc] Support Netty Logging at the network layer #379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
NettyLoggeris introduced as a new class which is able to construct a log handler depending on the log level:<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.<Logger name="com.alibaba.fluss.rpc.netty.NettyLogger" level="TRACE" additivity="false">: Netty's own log handler is used which dumps the message contents.TRACEorDEBUG) 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.