Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
*) Logging GUI handler: line-size is now set to max-size if max-size was exceeded See: http://www.yacy-forum.de/viewtopic.php?p=36355
thelie1a5babff1a9
diff --git a/htroot/ViewLog_p.html b/htroot/ViewLog_p.htmlindex 3025671c4..c73e20196 100644--- a/htroot/ViewLog_p.html+++ b/htroot/ViewLog_p.html@@ -11,7 +11,7 @@<form action="ViewLog_p.html" method="get" ><fieldset>- <input type="text" name="lines" id="lines" size ="4" value="#[lines]#" maxlength="9" /><label for="lines"> Lines</label>+ <input type="text" name="lines" id="lines" size ="4" value="#[lines]#" maxlength="9" /><label for="lines"> Lines (max. #[maxlines]#)</label><input type="checkbox" name="mode" id="mode" value="reversed" #(reverseChecked)#::checked="checked"#(/reverseChecked)# /><label for="mode">reversed order</label><input type="text" name="filter" id="filter" size ="30" value="#[filter]#" maxlength="60" /><input type="submit" value="refresh" />diff --git a/htroot/ViewLog_p.java b/htroot/ViewLog_p.javaindex a45e3c129..7da3632e0 100644--- a/htroot/ViewLog_p.java+++ b/htroot/ViewLog_p.java@@ -64,7 +64,7 @@ public class ViewLog_p {serverObjects prop = new serverObjects();String[] log = new String[0];boolean reversed = false;- int lines = 200;+ int maxlines = 400, lines = 200;String filter = ".*.*";if(post != null){@@ -85,6 +85,8 @@ public class ViewLog_p {boolean displaySubmenu = false;for (int i=0; i<handlers.length; i++) {if (handlers[i] instanceof GuiHandler) {+ maxlines = ((GuiHandler)handlers[i]).getSize();+ if (lines > maxlines) lines = maxlines;log = ((GuiHandler)handlers[i]).getLogLines(reversed,lines);} else if (handlers[i] instanceof LogalizerHandler) {displaySubmenu = true;@@ -94,6 +96,7 @@ public class ViewLog_p {prop.put("submenu", (displaySubmenu) ? 1 : 0);prop.put("reverseChecked", reversed ? 1 : 0);prop.put("lines", lines);+ prop.put("maxlines",maxlines);prop.put("filter", filter);// trying to compile the regular expression filter expressiondiff --git a/source/de/anomic/server/logging/GuiHandler.java b/source/de/anomic/server/logging/GuiHandler.javaindex cc77ce99b..3a1da0b85 100644--- a/source/de/anomic/server/logging/GuiHandler.java+++ b/source/de/anomic/server/logging/GuiHandler.java@@ -131,6 +131,10 @@ public class GuiHandler extends Handler{this.count = 0;}+ public int getSize() {+ return this.size;+ }+public synchronized void publish(LogRecord record) {if (!isLoggable(record)) return;