Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java -D"logging.config"="my.log4j2.xml" [..]

  • In Tomcat context .xml file: This is useful for a war-file deployment in a web application server. This file can be found (or if not create it) in the <webappserver>/WEB-INF/<web context>/META-INF directory.

...

  • The context file is a XML file with the same name as the web application context (respective the war-file deployed. E.g. autodigit.xml) and is located in <tomcat installation>/conf/Catalina/localhost directory. For more information see Apache Tomcat documentation: https://tomcat.apache.org/tomcat-10.0-doc/config/context.html.

Example for Tomcat context file:

Code Block
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE Context> 
  <Context>     
     <Parameter 
          name="logging.level.com.software.kgs"         
          value="info" 
          override="true" />      
     <Parameter     
          name="logging.config" 
          value="C:/Program Files/tomcat/webapps/coreoftia/META-INF/my.log4j2.xml" 
          override="true" />
  </Context>         

...