Optimization log4j2 configuration, remove session id from URL in web.xml.

git-svn-id: https://svn.libreccm.org/ccm/trunk@5621 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2018-08-01 17:14:46 +00:00
parent cc5a0ec6ad
commit b481fee25a
5 changed files with 105 additions and 41 deletions

View File

@ -3,7 +3,7 @@
name="ccm-core" name="ccm-core"
prettyName="Core" prettyName="Core"
version="6.6.6" version="6.6.6"
release="3" release="4"
shared="true" shared="true"
webapp="ROOT" webapp="ROOT"
buildHooks="build-hooks.xml"> buildHooks="build-hooks.xml">

View File

@ -5,8 +5,6 @@
<target name="compile-hook"> <target name="compile-hook">
<mkdir dir="${build.src.dir}/com/arsdigita/installer"/> <mkdir dir="${build.src.dir}/com/arsdigita/installer"/>
<!-- Old style initializer completely removed. -->
<!-- <mkdir dir="${build.src.dir}/com/arsdigita/initializer"/> -->
<mkdir dir="${build.src.dir}/com/redhat/persistence/pdl"/> <mkdir dir="${build.src.dir}/com/redhat/persistence/pdl"/>
<mkdir dir="${build.src.dir}/com/redhat/persistence/common"/> <mkdir dir="${build.src.dir}/com/redhat/persistence/common"/>
<mkdir dir="${build.src.dir}/com/redhat/persistence/oql"/> <mkdir dir="${build.src.dir}/com/redhat/persistence/oql"/>
@ -15,13 +13,6 @@
outputdirectory="${build.src.dir}/com/arsdigita/installer" outputdirectory="${build.src.dir}/com/arsdigita/installer"
javacchome="${javacc.home.dir}" javacchome="${javacc.home.dir}"
/> />
<!-- Old style initializer completely removed.
<javacc
target="${src.dir}/com/arsdigita/initializer/ScriptParser.jj"
outputdirectory="${build.src.dir}/com/arsdigita/initializer"
javacchome="${javacc.home.dir}"
/>
-->
<javacc <javacc
target="${src.dir}/com/redhat/persistence/pdl/PDLParser.jj" target="${src.dir}/com/redhat/persistence/pdl/PDLParser.jj"
outputdirectory="${build.src.dir}/com/redhat/persistence/pdl" outputdirectory="${build.src.dir}/com/redhat/persistence/pdl"
@ -51,10 +42,12 @@
<target name="deploy-hook"> <target name="deploy-hook">
<fail message="Property this.deploy.dir not defined." <fail message="Property this.deploy.dir not defined."
unless="this.deploy.dir" /> unless="this.deploy.dir" />
<!-- deploy the log4j configuration file into the web applications <!-- deploy the log4j v2 configuration file into the web applications
document root tree --> document root tree -->
<!--copy todir="${this.deploy.dir}/WEB-INF" <mkdir dir="${this.deploy.dir}/WEB-INF/conf"/>
file="${src.dir}/log4j2.xml"/--> <copy todir="${this.deploy.dir}/WEB-INF/conf"
file="${src.dir}/log4j2.xml" />
<!-- project.xml moved to bundle cfg directory where it replaces <!-- project.xml moved to bundle cfg directory where it replaces
former application.cfg --> former application.cfg -->
<xslt style="${ccm.tools.xsl.dir}/build-version.xsl" <xslt style="${ccm.tools.xsl.dir}/build-version.xsl"

View File

@ -1,20 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Change status to DEBUG for more verbose output--> <!-- Change status to DEBUG for more verbose output-->
<configuration status="WARN"> <configuration status="INFO">
<appenders> <appenders>
<Console name="Console" target="SYSTEM_OUT"> <Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console> </Console>
<File name="ErrorLog" fileName="logs/error.log"> <File name="FileLog" fileName="/var/log/tomcat7s/trunklcs/libreccm.log">
<PatternLayout pattern="%d{yyyy-mm-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> <PatternLayout pattern="%d{yyyy-mm-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</File> </File>
</appenders> </appenders>
<loggers> <loggers>
<root>
<appender-ref ref="Console"/> <root level="ERROR" additivity="false" >
<appender-ref ref="ErrorLog" level="error"/> <appenderRef ref="Console"/>
<appenderRef ref="FileLog" />
</root> </root>
<!-- Progress of libreccm container startup process -->
<Logger name="com.arsdigita.web.CCMApplicationContextListener"
level="INFO" additivity="false" >
<appenderRef ref="Console"/>
<appenderRef ref="FileLog" />
</Logger>
<!-- Progress of libreccm main runtime initialization process -->
<!--
<Logger name="com.arsdigita.runtime.Runtime"
level="INFO" additivity="false" >
<appenderRef ref="Console"/>
<appenderRef ref="FileLog" />
</Logger>
-->
<!-- Set level="DEBUG" to get information about XSLT file resolution -->
<Logger name="com.arsdigita.templating.PatternStylesheetResolver"
level="DEBUG" additivity="false" >
<!-- output just to libreccm specific application log, no system log -->
<appenderRef ref="FileLog" />
</Logger>
43,1 40%
<!-- Set level="DEBUG" to get information JSP file dispatcher -->
<Logger name="com.arsdigita.web.ApplicationFileServlet"
level="ERROR" additivity="false" >
<appenderRef ref="FileLog" />
</Logger>
<Logger name="com.arsdigita.web.DefaultApplicationFileResolver"
level="ERROR" additivity="false" >
<appenderRef ref="FileLog" />
</Logger>
<!-- Set level="DEBUG" to collect all queries run by persistence -->
<Logger name="com.arsdigita.web.ApplicationFileServlet"
level="ERROR" additivity="false" >
<appenderRef ref="FileLog" />
</Logger>
<!-- uncomment / add entries for detailed information per package -->
<!--
<Logger name="com.arsdigita.PACKAGE.CLASS"
level="DEBUG" additivity="false" >
<appenderRef ref="FileLog" />
</Logger>
-->
</loggers> </loggers>
</configuration> </configuration>

View File

@ -1,29 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" <web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="2.4"> version="3.0">
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
basic web.xml for ccm-core and basic functions. If basic web.xml for ccm-core and basic functions. If
additional modules provide specific web.xml snippets they must be additional modules provide specific web.xml snippets they must be
integrated before CCM is ready to work. Alternatively a integrated before CCM is ready to work. Alternatively a
complete web.xml file from an installation bundle may be used. complete web.xml file from an installation bundle may be used.
ccm-core requires at minimum Servlet Spec 3.0 / Tomcat 7.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<display-name>CCM</display-name> <display-name>CCM</display-name>
<description>Content and Collaboration Management</description> <description>Content and Collaboration Management</description>
<!-- <!-- path and filename of the log4j2 user accessible config file
path and filename of the log4j user accessible config file By default is is the same as the class path accessible file
WEB-INF/conf/log4j.properties is the built-in default value in class ccm-core-x.y.z.jar. -->
--> <context-param>
<context-param> <param-name>log4jConfiguration</param-name>
<param-name>log4j-conf-file</param-name> <param-value>WEB-INF/conf/log4j2.xml</param-value>
<param-value>WEB-INF/conf/log4j.properties</param-value> </context-param>
</context-param>
<!-- Prevent Session ID in URL (for security reasons!) -->
<session-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<!-- Require secure connection by redirect to host-port part <!-- Require secure connection by redirect to host-port part
of parameter waf.web.secure_server of parameter waf.web.secure_server

View File

@ -1,20 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" <web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="2.4"> version="3.0">
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
basic web.xml for ccm-core and basic functions. If basic web.xml for ccm-core and basic functions. If
additional modules provide specific web.xml snippets they must be additional modules provide specific web.xml snippets they must be
integrated before CCM is ready to work. Alternatively a integrated before CCM is ready to work. Alternatively a
complete web.xml file from an installation bundle may be used. complete web.xml file from an installation bundle may be used.
ccm-core requires at minimum Servlet Spec 3.0 / Tomcat 7.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<display-name>CCM</display-name> <display-name>CCM</display-name>
<description>Content and Collaboration Management</description> <description>Content and Collaboration Management</description>
<!-- path and filename of the log4j2 user accessible config file
By default is is the same as the class path accessible file
in class ccm-core-x.y.z.jar. -->
<context-param>
<param-name>log4jConfiguration</param-name>
<param-value>WEB-INF/conf/log4j2.xml</param-value>
</context-param>
<!-- Prevent Session ID in URL (for security reasons!) -->
<session-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<!-- Require secure connection by redirect to host-port part <!-- Require secure connection by redirect to host-port part
of parameter waf.web.secure_server of parameter waf.web.secure_server