Only put our header on logged reports, not reports generated by explicit
callers. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5466 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -65,7 +65,7 @@ public class ReportManager
|
|||||||
_reportInterval = new Interval(rqueue) {
|
_reportInterval = new Interval(rqueue) {
|
||||||
@Override
|
@Override
|
||||||
public void expired () {
|
public void expired () {
|
||||||
logReport(generateReport(System.currentTimeMillis(), true));
|
logReport(LOG_REPORT_HEADER + generateReport(System.currentTimeMillis(), true));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
_reportInterval.schedule(REPORT_INTERVAL, true);
|
_reportInterval.schedule(REPORT_INTERVAL, true);
|
||||||
@@ -95,7 +95,7 @@ public class ReportManager
|
|||||||
{
|
{
|
||||||
long sinceLast = now - _lastReportStamp;
|
long sinceLast = now - _lastReportStamp;
|
||||||
long uptime = now - _serverStartTime;
|
long uptime = now - _serverStartTime;
|
||||||
StringBuilder report = new StringBuilder("State of server report:\n");
|
StringBuilder report = new StringBuilder();
|
||||||
|
|
||||||
report.append("- Uptime: ");
|
report.append("- Uptime: ");
|
||||||
report.append(StringUtil.intervalToString(uptime)).append("\n");
|
report.append(StringUtil.intervalToString(uptime)).append("\n");
|
||||||
@@ -166,4 +166,7 @@ public class ReportManager
|
|||||||
|
|
||||||
/** The frequency with which we generate "state of server" reports. */
|
/** The frequency with which we generate "state of server" reports. */
|
||||||
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
||||||
|
|
||||||
|
/** The header to prefix to our logged reports. */
|
||||||
|
protected static final String LOG_REPORT_HEADER = "State of server report:\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user