Skip to content
Snippets Groups Projects
Commit ffb5aaab authored by Sergiu Dumitriu's avatar Sergiu Dumitriu
Browse files

XWIKI-10649: Capture the logs from the standalone Jetty package in a file

Done.
parent 65ad99f2
No related merge requests found
......@@ -37,6 +37,11 @@
<artifactId>xwiki-platform-tool-jetty-listener</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
......
......@@ -42,6 +42,7 @@
<excludes>
<exclude>org.eclipse.jetty:jetty-start</exclude>
<exclude>org.xwiki.platform:xwiki-platform-tool-jetty-listener</exclude>
<exclude>commons-io:commons-io</exclude>
<!-- jetty-start.jar's start.config file (see http://wiki.eclipse.org/Jetty/Feature/Start.jar) expects the
Servlet API JAR to be named servlet-api-3.0.jar. However Jetty names it javax.servlet-<version>.jar, thus
we need to rename it. -->
......@@ -66,6 +67,7 @@
<outputDirectory>/jetty/lib/ext</outputDirectory>
<includes>
<include>org.xwiki.platform:xwiki-platform-tool-jetty-listener</include>
<include>commons-io:commons-io</include>
</includes>
<!-- Needed to prevent warning since our project has a pom packaging and is not producing any artifact -->
<useProjectArtifact>false</useProjectArtifact>
......
<?xml version="1.0"?>
<!--
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- =============================================================== -->
<!-- Configure stderr and stdout to also go to a rollover log file -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<New id="ServerLog" class="java.io.PrintStream">
<Arg>
<!-- Split output to both the file and the old stderr -->
<New class="org.apache.commons.io.output.TeeOutputStream">
<Arg>
<New class="org.eclipse.jetty.util.RolloverFileOutputStream">
<Arg><Property name="xwiki.data.dir" default="."/>/logs/yyyy_mm_dd.output.log</Arg>
<Arg type="boolean">false</Arg>
<Arg type="int">90</Arg>
<Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
<Get id="ServerLogName" name="datedFilename"/>
</New>
</Arg>
<Arg><Get class="java.lang.System" name="err"/></Arg>
</New>
</Arg>
</New>
<Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>
</Configure>
......@@ -36,4 +36,4 @@
</Arg>
</Call>
</Configure>
\ No newline at end of file
</Configure>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment