Add router log location to logs.jsp

This commit is contained in:
zzz
2009-06-28 17:40:17 +00:00
parent 0bc6fd246f
commit 256c5356fb
3 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,8 @@ public class LogsHelper extends HelperBase {
public LogsHelper() {} public LogsHelper() {}
public String getLogs() { public String getLogs() {
return formatMessages(_context.logManager().getBuffer().getMostRecentMessages()); String str = formatMessages(_context.logManager().getBuffer().getMostRecentMessages());
return "Location: " + _context.logManager().currentFile() + "<br />" + str;
} }
public String getCriticalLogs() { public String getCriticalLogs() {

View File

@ -202,6 +202,10 @@ public class LogManager {
loadConfig(); loadConfig();
} }
public String currentFile() {
return _writer.currentFile();
}
/** /**
* Used by Log to add records to the queue * Used by Log to add records to the queue
* *

View File

@ -93,6 +93,9 @@ class LogWriter implements Runnable {
} }
} }
public String currentFile() {
return _currentFile != null ? _currentFile.getAbsolutePath() : "uninitialized";
}
private void rereadConfig() { private void rereadConfig() {
long now = Clock.getInstance().now(); long now = Clock.getInstance().now();