|
@ -0,0 +1,26 @@
|
|
|
package com.yihu.wlyy.logs;
|
|
|
|
|
|
import org.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
/**
|
|
|
* Created by lyr-pc on 2017/1/22.
|
|
|
*/
|
|
|
public class InterfaceCallLogs {
|
|
|
// 日志输出
|
|
|
private static Logger logger = LoggerFactory.getLogger(InterfaceCallLogs.class);
|
|
|
|
|
|
/**
|
|
|
* 接口调用日志输出
|
|
|
*
|
|
|
* @param info 日志信息
|
|
|
*/
|
|
|
public static void info(long time, String url, String user, String info) {
|
|
|
try {
|
|
|
logger.info(user + " - " + url + " - " + time + "ms - " + info.toString());
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
}
|