ソースを参照

改为可继承扩展

James 5 年 前
コミット
5e9f33fc77
1 ファイル変更7 行追加7 行削除
  1. 7 7
      src/main/java/com/jfinal/core/ActionReporter.java

+ 7 - 7
src/main/java/com/jfinal/core/ActionReporter.java

@@ -29,12 +29,12 @@ import com.jfinal.aop.Interceptor;
  */
 public class ActionReporter {
 	
-	private static final String title = "\nJFinal-" + Const.JFINAL_VERSION + " action report -------- ";
-	private static boolean reportAfterInvocation = true;
-	private static int maxOutputLengthOfParaValue = 512;
-	private static Writer writer = new SystemOutWriter();
+	protected static final String title = "\nJFinal-" + Const.JFINAL_VERSION + " action report -------- ";
+	protected static boolean reportAfterInvocation = true;
+	protected static int maxOutputLengthOfParaValue = 512;
+	protected static Writer writer = new SystemOutWriter();
 	
-	private static final ThreadLocal<SimpleDateFormat> sdf = new ThreadLocal<SimpleDateFormat>() {
+	protected static final ThreadLocal<SimpleDateFormat> sdf = new ThreadLocal<SimpleDateFormat>() {
 		protected SimpleDateFormat initialValue() {
 			return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 		}
@@ -58,7 +58,7 @@ public class ActionReporter {
 		ActionReporter.writer = writer;
 	}
 	
-	public static boolean isReportAfterInvocation(HttpServletRequest request) {
+	public boolean isReportAfterInvocation(HttpServletRequest request) {
 		if (reportAfterInvocation) {
 			return true;
 		} else {
@@ -74,7 +74,7 @@ public class ActionReporter {
 	/**
 	 * Report the action
 	 */
-	public static final void report(String target, Controller controller, Action action) {
+	public void report(String target, Controller controller, Action action) {
 		StringBuilder sb = new StringBuilder(title).append(sdf.get().format(new Date())).append(" --------------------------\n");
 		sb.append("Url         : ").append(controller.getRequest().getMethod()).append(" ").append(target).append("\n");
 		Class<? extends Controller> cc = action.getControllerClass();