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"
prettyName="Core"
version="6.6.6"
release="3"
release="4"
shared="true"
webapp="ROOT"
buildHooks="build-hooks.xml">

View File

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

View File

@ -1,20 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Change status to DEBUG for more verbose output-->
<configuration status="WARN">
<configuration status="INFO">
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</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"/>
</File>
</File>
</appenders>
<loggers>
<root>
<appender-ref ref="Console"/>
<appender-ref ref="ErrorLog" level="error"/>
<loggers>
<root level="ERROR" additivity="false" >
<appenderRef ref="Console"/>
<appenderRef ref="FileLog" />
</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>
</configuration>
</configuration>

View File

@ -1,29 +1,34 @@
<?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"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
basic web.xml for ccm-core and basic functions. If
additional modules provide specific web.xml snippets they must be
integrated before CCM is ready to work. Alternatively a
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>
<description>Content and Collaboration Management</description>
<display-name>CCM</display-name>
<description>Content and Collaboration Management</description>
<!--
path and filename of the log4j user accessible config file
WEB-INF/conf/log4j.properties is the built-in default value
-->
<context-param>
<param-name>log4j-conf-file</param-name>
<param-value>WEB-INF/conf/log4j.properties</param-value>
</context-param>
<!-- 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
of parameter waf.web.secure_server

View File

@ -1,21 +1,35 @@
<?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"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
basic web.xml for ccm-core and basic functions. If
additional modules provide specific web.xml snippets they must be
integrated before CCM is ready to work. Alternatively a
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>
<description>Content and Collaboration Management</description>
<display-name>CCM</display-name>
<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
of parameter waf.web.secure_server
<filter>