回滚日志记录中的文本长度限制

时间:2011-12-05 10:24:20

标签: logging cxf logback

我们使用logback.xml配置文件将应用程序SOAP请求记录到接口。 SOAP请求本身是使用Apache CXF框架生成的。

配置如下。

<logger name="org.apache.cxf.interceptor.LoggingInInterceptor" additivity="false">
    <level value="INFO" />
    <appender-ref ref="SOAPENVELOPLOGS" />
</logger>

我们面临的问题是当SOAP请求/响应的长度超过102410个字符时,其余的文本不会打印在日志中。因此,我们在日志中打印了部分请求/响应。

想知道这个长度限制是在logback还是Apache CXF中。 那就是有相同的工作吗?

由于

2 个答案:

答案 0 :(得分:5)

CXF。 LoggingInInterceptor上有一个属性来控制它记录的限制大小。您需要在那里设置限制。

答案 1 :(得分:0)

您可以设置限制

11/21 14:02:22: Launching app
$ adb shell am start -n "com.example.flow/com.example.flow.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.example.flow | com.example.flow.test
Waiting for application to come online: com.example.flow | com.example.flow.test
Waiting for application to come online: com.example.flow | com.example.flow.test
Waiting for application to come online: com.example.flow | com.example.flow.test
Connecting to com.example.flow
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ActivityThread: Application com.example.flow is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8620', transport: 'socket'
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1399)
W/om.example.flo: JIT profile information will not be recorded: profile file does not exits.
I/chatty: uid=10085(com.example.flow) identical 10 lines
W/om.example.flo: JIT profile information will not be recorded: profile file does not exits.
I/InstantRun: starting instant run server: is main process
W/om.example.flo: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/om.example.flo: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
D/OpenGLRenderer: Skia GL Pipeline
D/: HostConnection::get() New Host Connection established 0xcb955e80, tid 17046
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
    android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 1
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/OpenGLRenderer: Swap behavior 0
D/EGL_emulation: eglCreateContext: 0xcb897b40: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xcb897b40: ver 3 0 (tinfo 0xde66cde0)
D/EGL_emulation: eglMakeCurrent: 0xcb897b40: ver 3 0 (tinfo 0xde66cde0)
W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@923b4b0
I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
D/EGL_emulation: eglMakeCurrent: 0xcb897b40: ver 3 0 (tinfo 0xde66cde0)