当前位置: 首页 > 面试题库 >

在Weblogic 12c启动期间出现来自Struts的额外信息消息

商飞航
2023-03-14
问题内容

我有一个Web应用程序,它是使用Struts2(2.3.15.3)为部署在Oracle Weblogic
12c上的MVC构建的。该Web应用程序按原样运行良好,只是将其部署在Weblogic中时,它会从Weblogic std
IO上的struts代码打印一些额外的信息消息,而这不是必需的。

我已经尝试通过调整最低严重性来设置日志值并将日志记录实现从默认的JDK更改为log4j来配置Weblogic日志服务程序,但这也无济于事。

它一直将这些信息消息从Struts打印到std输出。我认为我想做的最后一件事就是玩LogFilterMBean并编写自定义日志过滤器。关于这些有什么建议吗?TIA

Jan 28, 2014 12:21:44 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
2014-01-28 12:21:48,352:INFO   :[ACTIVE] ExecuteThread: '0' for queue:    'weblogic.kernel.Default (self-tuning)': Parsing configuration file [struts-default.xml]              [system]: XmlConfigurationProvider 
2014-01-28 12:21:48,410:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Unable to locate configuration files of the name struts-plugin.xml, skipping [system]: XmlConfigurationProvider 
2014-01-28 12:21:48,411:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Parsing configuration file [struts-plugin.xml]               [system]: XmlConfigurationProvider 
2014-01-28 12:21:48,465:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Parsing configuration file [struts.xml]                      [system]: XmlConfigurationProvider 
2014-01-28 12:21:48,469:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,470:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,470:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,471:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,471:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,471:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,472:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,472:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,472:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,472:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionFileProcessor) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterCreator) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.TypeConverterHolder) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,473:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue:  'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.views.velocity.VelocityManager) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,474:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,475:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,476:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,476:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser) [system]: BeanSelectionProvider    
2014-01-28 12:21:48,690:INFO   :[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)': WebLogic server detected. Enabling Struts parameter

问题答案:

您可以使用xwork.loggerFactory系统属性来指定要与Struts2框架一起使用的自定义记录器工厂。默认情况下,它按照显示顺序选择公共日志或slf4j。如何编写记录器工厂,可以在这里找到。

对于使用log4j记录公共日志,您可以配置log4j配置文件,例如属性

log4j.logger.org.apache=ERROR,Console
log4j.logger.com.opensymphony.xwork2=ERROR,Console
log4j.logger.com.opensymphony.xwork2.interceptor=ERROR
log4j.logger.com.opensymphony.xwork2.ognl=ERROR
log4j.logger.freemarker=ERROR,Console

在我的情况下Console,您使用的附加器是,但是您可以更改此设置。服务器应通过抑制INFO级别立即对此做出反应。



 类似资料:
  • 我为WEKA编写了一个自定义分类器,它需要提供除实例的预测类之外的信息。具体来说,它是一个列表,描述了每个训练实例子集对预测类的影响有多大。 additionalMeasureProducer界面将无法工作,因为我需要将字符串打印到GUI。我希望用户能够选择输出此信息。我原本希望“分类器评估选项”对话框中的选项“输出模型”可以起到作用,但WEKA最终在分类之前调用了我的分类器的方法。我认为这是一个

  • 启动信息是在调用接口前的需求,可以在应用启动的时候一次性获取全部通用配置信息。 启动信息的移动端处理方式 移动端在版本发布支出将部分配置信息的默认配置打包写入本地.应用使用过程中更新启动信息,优先使用服务器提供的最新的信息. 列出所有启动者配置 GET /bootstrappers 响应 Status: 200 OK { "server:version": "1.6.0", "wall

  • 我只是在应用程序的pom.xml中添加了一个spring-boot-starter-actuctor依赖项。生成并运行项目后,/healthendpoint显示下一个信息: 如何从响应中删除“详细信息”部分?

  • 我的公司有一个以JSON格式发送实时消息的消息传递系统,它不是建立在AWS上的,也不会与AWS有任何VPN连接。 我们的团队正在尝试使用AWS SQS接收这些消息,然后DynamoDB将JSON消息处理到TSV,然后加载到RDS中。 但是,根据FAQ,SQS只能从AWS内部接收消息。https://aws.amazon.com/sqs/faqs/ 我在这里的问题是: 我的想法正确吗? 如果正确,您

  • 我在TestCafe studio中运行了一个测试,该测试进入网站,单击页面并暂停。在暂停期间,我希望弹出一个消息框并显示一条评论(用作解释网站上发生的事情的教学工具)。我试过几种方法,但都不管用。我对这个很陌生,可能错过了什么? 提前谢谢!下面是我的简单测试代码 从“testcafe”导入{Selector,ClientFunction};从“弹出窗口”导入{popups};夹具。页面.http

  • 我有一个Kafka主题,目前有3个分区。我希望我的消费者从同一个分区读取,但每条消息都应该以循环方式发送给不同的消费者。有可能实现吗?