*) 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

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3786 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent 94cc9f05f5
commit e1a5babff1

@ -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" />

@ -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 expression

@ -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;

Loading…
Cancel
Save