loggingtcpkeep-aliveopen-liberty

How do I configure the loging in Open Liberty to trace tcp connection details (like keep-alive behavior)?


I want to debug the network layer in Open Libery (OL), with the focus on keep alive behavior. For that, I want to enabled tracing in OL's server.xml. Something like the following:

<logging traceSpecification="com.ibm.ws.*=all:io.openliberty.*=all"/>

Question 1: What package names should I use when I want to focus on (tcp) networking?

Question 2: How do I configure OL to see the trace information in the stdout? (I'm deploying my server to CloudFoundry)

Thanks.


Solution

    1. According to pages like https://www.ibm.com/support/pages/set-trace-and-get-full-dump-websphere-liberty, it appears a trace string like TCPChannel=all might be what you're looking for. Also see https://www.ibm.com/support/pages/mustgather-read-first-websphere-application-server-and-liberty
    2. According to https://www.ibm.com/docs/en/was-liberty/base?topic=liberty-logging-trace, you can specify the attribute traceFileName="stdout"

    The trace.log file is only created if additional or detailed trace is enabled. stdout is recognized as a special value, and causes trace to be directed to the original standard out stream.