jsf 2 - Log4j configuration in jsf web app -
The following configuration is working when I am deploying the Vip App in my local machine (window)
public zero reference start (ServletContextEvent sce) {logger logger = null; Alloconnected sublextext = sce.getServletContext (); String prefix = servletContext.getRealPath ("/"); String log4jFile = servletContext.getInitParameter ("log4j"); If (log4jFile! = Null) {DOMConfigurator.configure (prefix + log 4 jifail); Logger = LogManager.getLogger (StartupListener.class.getName ()); Logger.info ("LOG4J is successfully loaded:" + 4 logfile); }} & Lt; Context-absolute & gt; & Lt; Ultimate Name & gt; Log4j & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Web-INF / classes / com / domain / resource / log4j.xml & lt; / Super-valued & gt; & Lt; / Reference param & gt; & Lt; Listener & gt; & Lt; Audience category & gt; Com.domain.util.StartupListener & lt; / Listener Category & gt; & Lt; / Listener & gt; But when I install the web app in Linux, I get the following error message:
log4j: could not parse the error file [nullWEB-INF / Classes /com/domain/resources/log4j.xml]. Java.io.FileNotFoundException: /app/home/wdmt3/AdminServer/nullWEB-INF/classes/com/domain/resources/log4j.xml (No such file or directory) No Also advice?
& lt; Context-absolute & gt; & Lt; Ultimate Name & gt; Log4j & lt; / Lastname & gt; & Lt; Ultimate Price & gt; /WEB-INF/classes/com/domain/resources/log4j.xml< / Super-valued & gt; & Lt; / Reference param & gt;
Comments
Post a Comment