-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handling rotation of jetty logs as well
- Loading branch information
Showing
10 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> | ||
|
||
<Configure id="logging" class="org.eclipse.jetty.util.log.Log"> | ||
<New id="ServerLog" class="java.io.PrintStream"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.util.RolloverFileOutputStream"> | ||
<Arg><Property name="jetty.console-capture.dir" deprecated="jetty.logging.dir" default="/var/log/jetty9"/>/yyyy_mm_dd.jetty.log</Arg> | ||
<Arg type="boolean"><Property name="jetty.console-capture.append" deprecated="jetty.logging.append" default="false"/></Arg> | ||
<Arg type="int"><Property name="jetty.console-capture.retainDays" deprecated="jetty.logging.retainDays" default="30"/></Arg> | ||
<Arg> | ||
<Call class="java.util.TimeZone" name="getTimeZone"> | ||
<Arg><Property name="jetty.console-capture.timezone" deprecated="jetty.logging.timezone" default="GMT"/></Arg> | ||
</Call> | ||
</Arg> | ||
<Get id="ServerLogName" name="datedFilename"/> | ||
</New> | ||
</Arg> | ||
</New> | ||
|
||
<Get name="rootLogger"> | ||
<Call name="info"><Arg>Console stderr/stdout captured to <Ref refid="ServerLogName"/></Arg></Call> | ||
</Get> | ||
<Call class="java.lang.System" name="setErr"><Arg><Ref refid="ServerLog"/></Arg></Call> | ||
<Call class="java.lang.System" name="setOut"><Arg><Ref refid="ServerLog"/></Arg></Call> | ||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> | ||
|
||
<Configure id="logging" class="org.eclipse.jetty.util.log.Log"> | ||
<New id="ServerLog" class="java.io.PrintStream"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.util.RolloverFileOutputStream"> | ||
<Arg><Property name="jetty.console-capture.dir" deprecated="jetty.logging.dir" default="/var/log/jetty9"/>/yyyy_mm_dd.jetty.log</Arg> | ||
<Arg type="boolean"><Property name="jetty.console-capture.append" deprecated="jetty.logging.append" default="false"/></Arg> | ||
<Arg type="int"><Property name="jetty.console-capture.retainDays" deprecated="jetty.logging.retainDays" default="{{ JETTY_RETAIN_LOGS_IN_DAYS }}"/></Arg> | ||
<Arg> | ||
<Call class="java.util.TimeZone" name="getTimeZone"> | ||
<Arg><Property name="jetty.console-capture.timezone" deprecated="jetty.logging.timezone" default="GMT"/></Arg> | ||
</Call> | ||
</Arg> | ||
<Get id="ServerLogName" name="datedFilename"/> | ||
</New> | ||
</Arg> | ||
</New> | ||
|
||
<Get name="rootLogger"> | ||
<Call name="info"><Arg>Console stderr/stdout captured to <Ref refid="ServerLogName"/></Arg></Call> | ||
</Get> | ||
<Call class="java.lang.System" name="setErr"><Arg><Ref refid="ServerLog"/></Arg></Call> | ||
<Call class="java.lang.System" name="setOut"><Arg><Ref refid="ServerLog"/></Arg></Call> | ||
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
check system golr | ||
if loadavg (1min) > {{ LOAD_AVG }} then alert | ||
if loadavg (5min) > {{ LOAD_AVG }} then exec "/run-golr.sh" | ||
|
||
check process java | ||
matching "java" | ||
start program = "/run-golr.sh" | ||
stop program = "/usr/bin/killall java" | ||
if failed port 8080 then restart | ||
depend golr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters