我不知道这是否发生在任何人身上,我已经搜索过了,还没有找到任何解决方案,Log4J 也会打印所有网站内容和响应代码和图像..
][0xaf][0xac]aSn[0xbc][0xe4][0x85][0xbf]i[0x1]p[0xad][0x82])O[0xbb]"[0xd7]u[0x1a][0xcc]Q[0x87][0x98][0xeb][0xcb]+[0xf9][0x1e][0xa5][0xfd][0x83]l[0xb7][0xd6][0xb2][0xb4]RL2[0xe][0xc3]}[0xc][0xff]][0xf5][0xe3][0xad][0xda][0x83]a[0x91][\r]g[0x9a][0x9b][0xe6][0xeb][0xb7][0x80][0x8b][0xfb][0x12]:[0x14]3C[0xad][0xe5]JNN[0xc0][0xd3][0xb6]%[0xe1]_[0xd0]z([0xa4]K[0x90][0xcd][0xd8][0xcb][0xdb][0xfe][0xcc][0xf0][0x17][0xb0][0xab]f[0x7][0xc5][0x84][0xb6]=[0x91]6[0xc1]=r[0x86][0xc3]}^D4<[0xa0][0x8a][0x6]>[0xed][0xa7][0xa4][0xec]1[0x4][0x9b][0xdc][0xa5]Y*[0xa3][0xaa][0x13][0x9f]R[0x9e][\r][0x81][0xb0][0x99][0xcd]J[0xf8][0x12][0x88][0xfa]o[0x96][0xdd][0x92][\r][0xd0][0xbd][0xb8]du[0xa3]>[0xf5][0xe2][0xaa][0xb][0xd3][0xd1][0xad]0[0xf6]6[0xef]s[0x8b][0xcf][0xd0][0xd0][0xa8](0[0xa5]x[0x9]V[0x13][0xcb][0x1]<[0x83c[0xf1]A[0xfa]f[0xfa][0x97]SM[0xf3][0xc][0x91][0xe8][0x96][0x16]i[0xbf]"b[0xab][0x95]l[0x11]e[0xbd]_[0xe8] [0xe9][0xb0]A''[0xc7][0x9e][0x81][0xa7]"*[0x0]a[0xb][0xac]R[0x9f]x[0xcc][0x1c][0xc9][0xc0][0xcf][0xd8]J[0x19][0xa3]>e[0xde][0x99][0xcf]T[0xc2]{r[0xc5][0x84]r*[0xa4]8[0xe]"
2012-11-08 11:23:40,728 DEBUG - >> "[\r][\n]"
2012-11-08 11:23:40,728 DEBUG - >> "--"
2012-11-08 11:23:40,728 DEBUG - >> "Rn8Y3anzO4BsiuQ8eSDsFYPH8Yef21FYHm"
2012-11-08 11:23:40,728 DEBUG - >> "[\r][\n]"
2012-11-08 11:23:40,728 DEBUG - >> "Content-Disposition: form-data; name="
2012-11-08 11:23:40,728 DEBUG - >> """
2012-11-08 11:23:40,728 DEBUG - >> "description"
2012-11-08 11:23:40,728 DEBUG - >> """
2012-11-08 11:23:40,728 DEBUG - >> "[\r][\n]"
2012-11-08 11:23:40,728 DEBUG - >> "Rn8Y3anzO4BsiuQ8eSDsFYPH8Yef21FYHm"
2012-11-08 11:23:40,728 DEBUG - >> "--"
2012-11-08 11:23:40,728 DEBUG - >> "[\r][\n]"
2012-11-08 11:23:40,728 DEBUG - Request body sent
2012-11-08 11:23:41,481 DEBUG - << "HTTP/1.1 200 OK[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "HTTP/1.1 200 OK[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "Server: Apache-Coyote/1.1[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "Content-Type: text/html;charset=UTF-8[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "Transfer-Encoding: chunked[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "Date: Thu, 08 Nov 2012 11:14:44 GMT[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - << "[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - Completed Getting Page
2012-11-08 11:23:41,481 DEBUG - << "5"
2012-11-08 11:23:41,481 DEBUG - << "0"
2012-11-08 11:23:41,481 DEBUG - << "[\r]"
2012-11-08 11:23:41,481 DEBUG - << "[\n]"
2012-11-08 11:23:41,481 DEBUG - << "{"status":"OK","code":"unspecified","message":"successfully uploaded procedure"}"
2012-11-08 11:23:41,481 DEBUG - << "[\r]"
2012-11-08 11:23:41,481 DEBUG - << "[\n]"
2012-11-08 11:23:41,481 DEBUG - << "0"
2012-11-08 11:23:41,481 DEBUG - << "[\r]"
2012-11-08 11:23:41,481 DEBUG - << "[\n]"
2012-11-08 11:23:41,481 DEBUG - << "[\r]"
2012-11-08 11:23:41,481 DEBUG - << "[\n]"
2012-11-08 11:23:41,481 DEBUG - << "[\r][\n]"
2012-11-08 11:23:41,481 DEBUG - Resorting to protocol version default close connection policy
2012-11-08 11:23:41,482 DEBUG - Should NOT close connection, using HTTP/1.1
2012-11-08 11:23:41,482 DEBUG - Releasing connection back to connection manager.
我正在使用 apaches 的 httpClient 的 PostMethod() 和 GetMethod() .. 将数据从一个 servlet 发送到另一个 servlet。 我不打印这些。log4j 自己打印这些。我不明白。日志文件的大小约为 50 到 100 MB。
我的 Log4j 配置:-
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="INFO" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c{1}] %m %n" />
</layout>
</appender>
<appender name="DRFA" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/home/server/webSpecimen.log" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="Append" value="true" />
<param name="Threshold" value="DEBUG" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="DRFA" />
</root>
</log4j:configuration>