log4jinit.java

来自「天乙代码src_531.rar 天乙代码src_531.rar 天乙代」· Java 代码 · 共 36 行

JAVA
36
字号
package com.laoer.bbscs.servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.*;

/**
 * <p>Title: 天乙社区V5.0</p>
 * <p>Description: BBS-CS天乙社区V5.0</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: laoer.com</p>
 * @author 龚天乙
 * @version 5.0
 */

public class Log4jInit
    extends HttpServlet {
  //private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
  //Initialize global variables
  public void init() throws ServletException {
    /*
    String prefix = getServletContext().getRealPath("/");
    String file = getInitParameter("log4j");
    // if the log4j-init-file is not set, then no point in trying
    //System.out.println("................log4j start");
    if (file != null) {
      PropertyConfigurator.configure(prefix + file);
    }*/

  }

  //Clean up resources
  public void destroy() {
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?