Log4j2 and Spring use Webapprootkey

Source: Internet
Author: User
<span id="Label3"></p><pre class="brush:xml;toolbar:false">    <context-param>        <param-name >webAppRootKey</param-name>        <param-value> webapp.root</param-value>    </context-param>    < context-param>        <param-name>log4jconfiglocation</ Param-name>        <param-value>web-inf/classes/log4j2.xml </param-value>    </context-param>    <context-param >        <param-name>log4jRefreshInterval</param-name>         <param-value>3000</param-value>     </context-param>    <listener>         <listener-class>org.spriNgframework.web.util.log4jconfiglistener</listener-class>    </listener> </pre><p><p>The above is the configuration required by the Web. XML file</p></p><p><p>In the log4j2 XML file, use "${sys:webapp.root}" because Webapp.root is the system properties, you must use the SYS prefix.<br></p></p><p><p>This article is from the "flying fish technology" blog, Please be sure to keep this source http://flyingfish.blog.51cto.com/9580339/1694746</p></p><p><p>Log4j2 and Spring use Webapprootkey</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.