1 17 package org.apache.geronimo.system.logging; 18 19 import java.io.Serializable ; 20 21 24 public interface SystemLog { 25 29 public final static int MAX_SEARCH_RESULTS = 1000; 30 33 String getConfigFileName(); 34 37 void setConfigFileName(String fileName); 38 41 String getRootLoggerLevel(); 42 47 void setRootLoggerLevel(String level); 48 52 int getRefreshPeriodSeconds(); 53 57 void setRefreshPeriodSeconds(int seconds); 58 62 String [] getLogFileNames(); 63 70 SearchResults getMatchingItems(String logFile, Integer firstLine, Integer lastLine, String minLevel, 71 String regex, int maxResults, boolean includeStackTraces); 72 73 public static class LogMessage implements Serializable { 74 private final int lineNumber; 75 private final String lineContent; 76 77 public LogMessage(int lineNumber, String lineContent) { 78 this.lineNumber = lineNumber; 79 this.lineContent = lineContent; 80 } 81 82 public int getLineNumber() { 83 return lineNumber; 84 } 85 86 public String getLineContent() { 87 return lineContent; 88 } 89 } 90 91 public static class SearchResults implements Serializable { 92 private final int lineCount; private final LogMessage[] results; 94 private final boolean capped; 95 96 public SearchResults(int lineCount, LogMessage[] results, boolean capped) { 97 this.lineCount = lineCount; 98 this.results = results; 99 this.capped = capped; 100 } 101 102 public int getLineCount() { 103 return lineCount; 104 } 105 106 public LogMessage[] getResults() { 107 return results; 108 } 109 110 public boolean isCapped() { 111 return capped; 112 } 113 } 114 } 115 | Popular Tags |