在 WebSphere 9 中,日志语句被记录为 SystemOut

在 WebSphere 9 中,日志语句被记录为 SystemOut

[7/11/19 10:34:41:786 东部夏令时] 0000010b系统输出 O [2019-07-11 10:34:41,785] [Web容器:2]调试loader.Loader(getRow:1533)-结果行:

这实际上会将部署速度减慢至 30 分钟以上。

我正在使用的应用程序没有日志配置,并且依赖 WebSphere 的日志和跟踪来控制日志。我检查了日志级别故障排除 > 日志和跟踪 > server_name > 更改日志详细信息级别并将其设置为 *=info。无论此处设置了什么日志级别,SystemOut 都会打印,因为我相信它不受此配置控制。每 4 秒左右会创建新的 20MB 日志。

没有设置 genericJvmArguments。verboseModeClass 为 false。我将此服务器的 server.xml 与另一个不输出此类 SystemOut 的服务器进行了比较,发现文件看起来很相似。

我该如何解决此问题?哪些配置可能导致此问题?


更新添加了基于 PrintStream 调用者的堆栈跟踪这个答案。我在这里添加了两个堆栈跟踪。第一个有重定向,第二个有使用 SystemOutStream 的 com.ibm.ws.logging.WsHandlerWrapper.publish。

21:02:00.444 0x30004f00              mt.0        > java/io/PrintStream.println(Ljava/lang/String;)V bytecode method, this = 0x7ffa75098
21:02:00.444 0x30004f00       j9trc_aux.0        - jstacktrace:
21:02:00.444 0x30004f00       j9trc_aux.1        - [1] java.io.PrintStream.println (PrintStream.java:829)
21:02:00.444 0x30004f00       j9trc_aux.1        - [2] com.ibm.ejs.ras.hpel.HpelHelper.printHeader (HpelHelper.java:662)
21:02:00.444 0x30004f00       j9trc_aux.1        - [3] com.ibm.ejs.ras.RasHelper.printHeader (RasHelper.java:1898)
21:02:00.444 0x30004f00       j9trc_aux.1        - [4] com.ibm.ejs.ras.RasHelper.printHeader (RasHelper.java:1892)
21:02:00.444 0x30004f00       j9trc_aux.1        - [5] com.ibm.ejs.ras.SystemOutStream.replaceSystemOutStream (SystemOutStream.java:156)
21:02:00.444 0x30004f00       j9trc_aux.1        - [6] com.ibm.ws.runtime.WsServerImpl.redirectStream (WsServerImpl.java:459)
21:02:00.444 0x30004f00       j9trc_aux.1        - [7] com.ibm.ws.runtime.WsServerImpl.bootLoggingServices (WsServerImpl.java:402)
21:02:00.444 0x30004f00       j9trc_aux.1        - [8] com.ibm.ws.runtime.WsServerImpl.start (WsServerImpl.java:201)
21:02:00.444 0x30004f00       j9trc_aux.1        - [9] com.ibm.ws.runtime.WsServerImpl.main (WsServerImpl.java:697)
21:02:00.445 0x30004f00       j9trc_aux.1        - [10] com.ibm.ws.runtime.WsServer.main (WsServer.java:59)
21:02:00.445 0x30004f00       j9trc_aux.1        - [11] sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
21:02:00.445 0x30004f00       j9trc_aux.1        - [12] sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:90)
21:02:00.445 0x30004f00       j9trc_aux.1        - [13] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55) (Compiled Code)
21:02:00.445 0x30004f00       j9trc_aux.1        - [14] java.lang.reflect.Method.invoke (Method.java:508) (Compiled Code)
21:02:00.445 0x30004f00       j9trc_aux.1        - [15] com.ibm.wsspi.bootstrap.WSLauncher.launchMain (WSLauncher.java:234)
21:02:00.445 0x30004f00       j9trc_aux.1        - [16] com.ibm.wsspi.bootstrap.WSLauncher.main (WSLauncher.java:101)
21:02:00.445 0x30004f00       j9trc_aux.1        - [17] com.ibm.wsspi.bootstrap.WSLauncher.run (WSLauncher.java:82)
21:02:00.445 0x30004f00       j9trc_aux.1        - [18] sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
21:02:00.445 0x30004f00       j9trc_aux.1        - [19] sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:90)
21:02:00.445 0x30004f00       j9trc_aux.1        - [20] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55) (Compiled Code)
21:02:00.445 0x30004f00       j9trc_aux.1        - [21] java.lang.reflect.Method.invoke (Method.java:508) (Compiled Code)
21:02:00.445 0x30004f00       j9trc_aux.1        - [22] org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException (EclipseAppContainer.java:587)
21:02:00.445 0x30004f00       j9trc_aux.1        - [23] org.eclipse.equinox.internal.app.EclipseAppHandle.run (EclipseAppHandle.java:198)
21:02:00.445 0x30004f00       j9trc_aux.1        - [24] org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLauncher.java:110)
21:02:00.445 0x30004f00       j9trc_aux.1        - [25] org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:79)
21:02:00.445 0x30004f00       j9trc_aux.1        - [26] org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:354)
21:02:00.445 0x30004f00       j9trc_aux.1        - [27] org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:181)
21:02:00.445 0x30004f00       j9trc_aux.1        - [28] sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
21:02:00.445 0x30004f00       j9trc_aux.1        - [29] sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:90)
21:02:00.445 0x30004f00       j9trc_aux.1        - [30] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:55)
21:02:00.445 0x30004f00       j9trc_aux.1        - [31] java.lang.reflect.Method.invoke (Method.java:508)
21:02:00.445 0x30004f00       j9trc_aux.1        - [32] org.eclipse.core.launcher.Main.invokeFramework (Main.java:340)
21:02:00.445 0x30004f00       j9trc_aux.1        - [33] org.eclipse.core.launcher.Main.basicRun (Main.java:282)
21:02:00.445 0x30004f00       j9trc_aux.1        - [34] org.eclipse.core.launcher.Main.run (Main.java:981)
21:02:00.445 0x30004f00       j9trc_aux.1        - [35] com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse (WSPreLauncher.java:413)
21:02:00.445 0x30004f00       j9trc_aux.1        - [36] com.ibm.wsspi.bootstrap.WSPreLauncher.main (WSPreLauncher.java:174)
21:02:00.446 0x30004f00              mt.6        < java/io/PrintStream.println(Ljava/lang/String;)V bytecode method
.
.
.
02:09:27.893 0x33dd3000              mt.1        > java/io/PrintStream.println(Ljava/lang/String;)V compiled method, this = 0x700d16a70
02:09:27.893 0x33dd3000       j9trc_aux.0        - jstacktrace:
02:09:27.893 0x33dd3000       j9trc_aux.1        - [1] java.io.PrintStream.println (PrintStream.java:829) (Compiled Code)
02:09:27.893 0x33dd3000       j9trc_aux.1        - [2] com.ibm.ejs.ras.SystemStream.writeWebSphereEvent (SystemStream.java:738) (Compiled Code)
02:09:27.893 0x33dd3000       j9trc_aux.1        - [3] com.ibm.ejs.ras.SystemOutStream.logMessage (SystemOutStream.java:330) (Compiled Code)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [4] com.ibm.ejs.ras.SystemOutStream.processEvent (SystemOutStream.java:319) (Compiled Code)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [5] com.ibm.ws.logging.WsHandlerWrapper.publish (WsHandlerWrapper.java:43)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [6] java.util.logging.Logger.log (Logger.java:749) (Compiled Code)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [7] com.ibm.ws.logging.WsLogger.deliverOrBuffer (WsLogger.java:416)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [8] com.ibm.ws.logging.WsLogger.log (WsLogger.java:394)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [9] com.ibm.ws.logging.WsLogger.logp (WsLogger.java:599) (Compiled Code)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [10] org.apache.commons.logging.impl.Jdk14Logger.log (Jdk14Logger.java:126)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [11] org.apache.commons.logging.impl.Jdk14Logger.info (Jdk14Logger.java:193)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [12] org.springframework.context.support.AbstractApplicationContext.initMessageSource (AbstractApplicationContext.java:473)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [13] org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:334)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [14] org.springframework.context.support.ClassPathXmlApplicationContext.<init> (ClassPathXmlApplicationContext.java:92)
02:09:27.894 0x33dd3000       j9trc_aux.1        - [15] org.springframework.context.support.ClassPathXmlApplicationContext.<init> (ClassPathXmlApplicationContext.java:77)
.
.
.
.

相关内容