Log all network interactions of Java application

前端 未结 5 683
陌清茗
陌清茗 2020-12-29 22:53

I have a monstrous Java app (a client of little-known application server GNUEnterprise) and its source, which I can compile back after making some changes to it. The app use

5条回答
  •  隐瞒了意图╮
    2020-12-29 23:32

    I dug a little further, and apparently, HttpURLConnection comes with java.util.logging enabled by default.

    See related questions: Java: Display request of an HttpURLConnection before sending and How to enable wire logging for a java HttpURLConnection traffic?

    Java.util.logging was Sun's (failed) attempt at standardizing logging providers in Java 1.4. You can bridge it to SLF4J via the jul-to-slf4j module if you want to avoid tweaking system properties.

    But I would still prefer Fiddler or JMeter proxy though :-)

提交回复
热议问题