📄 testlog.jsp
字号:
<%@page import ="org.apache.commons.logging.*"%>
<%
// 获得Logger实例-helloappLogger
Log helloappLogger = LogFactory.getLog("helloappLogger");
out.print(helloappLogger);
// 获得Logger实例-childLogger
Log childLogger = LogFactory.getLog("helloappLogger.childLogger");
// 通过helloappLogger输出日志信息
helloappLogger.debug("This is a log message from the helloappLogger" );
helloappLogger.info("This is a log message from the helloappLogger");
helloappLogger.warn("This is a log message from the helloappLogger");
helloappLogger.error("This is a log message from the helloappLogger");
helloappLogger.fatal("This is a log message from the helloappLogger" );
// 通过childLogger输出日志信息
childLogger.debug("This is a log message from the childLogger");
childLogger.info("This is a log message from the childLogger");
childLogger.warn("This is a log message from the childLogger");
childLogger.error("This is a log message from the childLogger");
childLogger.fatal("This is a log message from the childLogger");
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -