📄 log4j.java
字号:
package com.ntsky.init;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.log4j.PropertyConfigurator;
/**
* <p>Title: 天网电台</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: fm880</p>
* @author 姚君林 (www.ntsky.com )
* @version 1.0
*/
public class Log4j extends HttpServlet {
//Initialize global variables
public void init() throws ServletException {
String profile = getServletContext().getRealPath("/")+getInitParameter("log4j");
PropertyConfigurator.configure(profile);
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
//Clean up resources
public void destroy() {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -