How to enable netty's inbound/outbound frame logging


#1

In the past I’ve enabled some setting in linkerd to turn on inbound/outbound frame logging in netty. It looks like this:

INFO 1019 12:14:43.238 finagle/netty4-3: 
----------------OUTBOUND--------------------
[id: 0xf1580aa6, L:/127.0.0.1:4142 - R:/127.0.0.1:54205] SETTINGS: ack=false, settings={}
------------------------------------
INFO 1019 12:14:43.238 finagle/netty4-3: 
----------------INBOUND--------------------
[id: 0xf1580aa6, L:/127.0.0.1:4142 - R:/127.0.0.1:54205] SETTINGS: ack=false, settings={}
------------------------------------

I cannot for the life of me remember how to turn that back on. Help me please!


#2

@olix0r came through with the fix:

ah, so if you’re working in the repo, just edit log4j.properties and set the level to TRACE

if you’re out of the repo, you can copy that file somewhere and set it via LOCAL_JVM_OPTIONS or we

I now see the inbound/outbound logging with this change:

diff --git a/linkerd/main/src/main/resources/log4j.properties b/linkerd/main/src/main/resources/log4j.properties
index b713c90..b0ae511 100644
--- a/linkerd/main/src/main/resources/log4j.properties
+++ b/linkerd/main/src/main/resources/log4j.properties
@@ -1,4 +1,4 @@
-log4j.rootLogger=WARN, stderr
+log4j.rootLogger=TRACE, stderr
 log4j.appender.stderr=org.apache.log4j.ConsoleAppender
 log4j.appender.stderr.Target=System.err
 log4j.appender.stderr.layout=org.apache.log4j.PatternLayout