我们正准备尽快将我们的 JSF 2(MyFaces with Facelets 页面)应用程序迁移到生产环境。目前,我们的控制台日志(WebSphere v8 上的 SystemOut.log)充满了大量此类消息:
[3/26/13 16:42:33:744 CDT] 00000031 HtmlImageRend W Component UIGraphic Form:errorIconSave has no attribute alt or attribute resolves to null. Path to component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /view/groupagreement/products/volumebased/VolumeBasedProducts.xhtml][Class: javax.faces.component.html.HtmlBody,Id: commonLayoutId][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id1364021679_785179b][Class: javax.faces.component.html.HtmlForm,Id: Form][Class: javax.faces.component.html.HtmlBody,Id: j_id363369746_1d362e8b][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id363369746_1d362e61][Class: org.richfaces.component.UIRegion,Id: j_id363369746_1d362e4a][Class: org.richfaces.component.UIPopupPanel,Id: confirmationPopUpForWayFinder][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id363369746_1d362ffd][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id363369746_1d362fbc][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id363369746_1d362f9a][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id363369746_1d362f70][Class: javax.faces.component.html.HtmlGraphicImage,Id: errorIconSave]}
[3/26/13 16:42:33:746 CDT] 00000031 HtmlResponseW W HTML nesting warning on closing div: element td rendered by component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /view/groupagreement/products/volumebased/VolumeBasedProducts.xhtml][Class: javax.faces.component.html.HtmlBody,Id: commonLayoutId][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id1364021679_785179b]} not explicitly closed
我们认为这种过度的日志记录可能会损害性能。虽然我们知道我们应该将我们的应用程序正确地编码为 html 规范,但它是由离岸供应商提供的,我们对代码质量没有我们想要的那样多的控制。此时我们可能没有时间修复所有的 xhtml 文件(将 alt 属性添加到图像等)。
有什么方法可以禁用此日志记录?例如 web.xml 上下文参数?我在 MyFaces 文档中找不到任何内容。