日志打印太多了改成debug
This commit is contained in:
parent
3a3f166006
commit
fe36de8bce
@ -100,7 +100,7 @@ public class HttpUtils {
|
||||
FileUtil.mkParentDirs(destFile);
|
||||
}
|
||||
|
||||
log.info("开始下载: {} -> {}", fileUrl, destFile.getAbsolutePath());
|
||||
log.debug("开始下载: {} -> {}", fileUrl, destFile.getAbsolutePath());
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
// 使用分块下载大文件
|
||||
@ -109,7 +109,7 @@ public class HttpUtils {
|
||||
// 结果验证
|
||||
if (downloadedSize > 0 && destFile.exists()) {
|
||||
long cost = System.currentTimeMillis() - startTime;
|
||||
log.info("下载成功! 大小: {} | 耗时: {}ms | 路径: {}",
|
||||
log.debug("下载成功! 大小: {} | 耗时: {}ms | 路径: {}",
|
||||
FileUtil.readableFileSize(destFile.length()),
|
||||
cost,
|
||||
destFile.getAbsolutePath());
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.mqtt.server;
|
||||
|
||||
import com.zhgd.xmgl.constant.Cts;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
|
||||
import org.slf4j.Logger;
|
||||
@ -28,6 +29,7 @@ import javax.annotation.Resource;
|
||||
* @create: 2019-10-16 16:21
|
||||
**/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class MqttConfig {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MqttConfig.class);
|
||||
|
||||
@ -175,10 +177,10 @@ public class MqttConfig {
|
||||
return message -> {
|
||||
try {
|
||||
String topic = message.getHeaders().get("mqtt_receivedTopic").toString();
|
||||
LOGGER.info("消息主题:{}", topic);
|
||||
log.debug("消息主题:{}", topic);
|
||||
Object payLoad = message.getPayload();
|
||||
LOGGER.info("主题:{},消息接收到的数据:{}", message.getHeaders().get("mqtt_receivedTopic"), payLoad);
|
||||
LOGGER.info("===================={}============", payLoad);
|
||||
log.debug("主题:{},消息接收到的数据:{}", message.getHeaders().get("mqtt_receivedTopic"), payLoad);
|
||||
log.debug("===================={}============", payLoad);
|
||||
dispatchHandler.message(topic, payLoad);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
@ -242,10 +242,10 @@ public class Mcs8Util {
|
||||
jo.put("page", page);
|
||||
jo.put("pagesize", pageSize);
|
||||
url = HttpUtil.urlWithForm(url, jo, CharsetUtil.CHARSET_UTF_8, false);
|
||||
log.info("mcs8 查询文件列表 url:{}", url);
|
||||
log.debug("mcs8 查询文件列表 url:{}", url);
|
||||
String result = HttpRequest.get(url).header("token", getToken(getHost(config), config.getPort(), config.getAccount(), config.getPassword())).execute().body();
|
||||
|
||||
log.info("mcs8 查询文件列表 result:{}", result);
|
||||
log.debug("mcs8 查询文件列表 result:{}", result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (isTokenExpiredError(jsonObject) && retry) {
|
||||
//删除token
|
||||
@ -271,10 +271,10 @@ public class Mcs8Util {
|
||||
jo.put("id", id);
|
||||
jo.put("expires", 7);
|
||||
url = HttpUtil.urlWithForm(url, jo, CharsetUtil.CHARSET_UTF_8, false);
|
||||
log.info("mcs8 获取文件网络访问地址 url:{}", url);
|
||||
log.debug("mcs8 获取文件网络访问地址 url:{}", url);
|
||||
String result = HttpRequest.get(url).header("token", getToken(getHost(config), config.getPort(), config.getAccount(), config.getPassword())).execute().body();
|
||||
|
||||
log.info("mcs8 获取文件网络访问地址 result:{}", result);
|
||||
log.debug("mcs8 获取文件网络访问地址 result:{}", result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (isTokenExpiredError(jsonObject) && retry) {
|
||||
//删除token
|
||||
@ -301,10 +301,10 @@ public class Mcs8Util {
|
||||
jo.put("page", page);
|
||||
jo.put("pageSize", pageSize);
|
||||
url = HttpUtil.urlWithForm(url, jo, CharsetUtil.CHARSET_UTF_8, false);
|
||||
log.info("mcs8 获取设备列表 url:{} ", url);
|
||||
log.debug("mcs8 获取设备列表 url:{} ", url);
|
||||
String result = HttpRequest.get(url).header("token", getToken(getHost(config), config.getPort(), config.getAccount(), config.getPassword())).execute().body();
|
||||
|
||||
log.info("mcs8 获取设备列表 result:{}", result);
|
||||
log.debug("mcs8 获取设备列表 result:{}", result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (isTokenExpiredError(jsonObject) && retry) {
|
||||
//删除token
|
||||
|
||||
@ -22,7 +22,7 @@ public class MdcThreadPoolTaskExecutor extends ThreadPoolTaskExecutor {
|
||||
public void execute(Runnable task) {
|
||||
Map<String, String> context = MDC.getCopyOfContextMap(); //复制主线程MDC
|
||||
JSONObject tlJo = ThreadLocalUtil.get();
|
||||
log.info("MDC异步多线程...");
|
||||
log.debug("MDC异步多线程...");
|
||||
JSONObject copyTl = BeanUtil.toBean(tlJo, JSONObject.class);
|
||||
super.execute(() -> {
|
||||
if (null != context) {
|
||||
@ -51,7 +51,7 @@ public class MdcThreadPoolTaskExecutor extends ThreadPoolTaskExecutor {
|
||||
public <T> Future<T> submit(Callable<T> task) {
|
||||
Map<String, String> context = MDC.getCopyOfContextMap(); //复制主线程MDC
|
||||
JSONObject tlJo = ThreadLocalUtil.get();
|
||||
log.info("MDC异步多线程...");
|
||||
log.debug("MDC异步多线程...");
|
||||
JSONObject copyTl = BeanUtil.toBean(tlJo, JSONObject.class);
|
||||
return super.submit(() -> {
|
||||
if (null != context) {
|
||||
|
||||
@ -46,7 +46,7 @@ public class TaskAspect {
|
||||
if (null == context) {
|
||||
LogMdcUtil.setRequestId("-t"); //主线程没有MDC就自己生成一个
|
||||
ThreadLocalUtil.addInKey(Cts.TL_IS_FROM_TASK, true);
|
||||
log.info("task方法开始:{}", methodName);
|
||||
log.debug("task方法开始:{}", methodName);
|
||||
}
|
||||
|
||||
// 获取方法所有参数及其类型
|
||||
@ -74,7 +74,7 @@ public class TaskAspect {
|
||||
}
|
||||
} finally {
|
||||
if (null == context) {
|
||||
log.info("task方法结束:{}", methodName);
|
||||
log.debug("task方法结束:{}", methodName);
|
||||
LogMdcUtil.clear();
|
||||
ThreadLocalUtil.remove();
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<maxHistory>2</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录debug级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
@ -116,7 +116,7 @@
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<logger name="com.zhgd" level="info"/>
|
||||
<logger name="com.zhgd.mybatis.DataScopeInterceptor" level="debug"/>
|
||||
<!-- <logger name="com.zhgd.mybatis.DataScopeInterceptor" level="debug"/>-->
|
||||
<logger name="java.sql.Connection" level="info"/>
|
||||
<logger name="java.sql.Statement" level="info"/>
|
||||
<logger name="java.sql.PreparedStatement" level="info"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user