
com.penglecode.common.web.interceptor.AbstractHttpRequestLoggerHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons Show documentation
Show all versions of commons Show documentation
commons is a little java tool to make your development easier in your work.
The newest version!
package com.penglecode.common.web.interceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 日志处理类,如将日志写入数据库、日志文件等等
*
* @param
* @author pengpeng
* @date 2014年10月17日 下午7:24:08
* @version 1.0
*/
public abstract class AbstractHttpRequestLoggerHandler implements Runnable {
private static final Logger logger = LoggerFactory.getLogger(AbstractHttpRequestLoggerHandler.class);
private final HttpRequestLogger httpRequestLogger;
public AbstractHttpRequestLoggerHandler(HttpRequestLogger httpRequestLogger) {
super();
this.httpRequestLogger = httpRequestLogger;
}
public void run() {
try {
handleLogger(httpRequestLogger);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
/**
* 日志处理方法,如将日志写入数据库、日志文件等等
* @param httpRequestLogger
* @throws Exception
*/
public abstract void handleLogger(HttpRequestLogger httpRequestLogger) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy