diff --git a/acs/nladmin-system/pom.xml b/acs/nladmin-system/pom.xml index 0a1f1db..6879b4b 100644 --- a/acs/nladmin-system/pom.xml +++ b/acs/nladmin-system/pom.xml @@ -186,11 +186,6 @@ - - com.github.loki4j - loki-logback-appender-jdk8 - 1.3.2 - org.apache.httpcomponents httpclient @@ -388,19 +383,13 @@ - - nl.basjes.parse.useragent - yauaa - 5.23 - + - eu.bitwalker - UserAgentUtils - 1.21 + com.yomahub + tlog-all-spring-boot-starter + 1.5.0 - - org.apache.lucene lucene-core diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java index c8a151a..43a0bc5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java @@ -184,4 +184,6 @@ public interface AcsToWmsService { HttpResponse feedbackVehicleType(JSONObject param); HttpResponse mark(JSONObject param); + + void syncDemo(); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index e531fee..63cbdc1 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -32,6 +32,7 @@ import org.nl.modules.wql.core.bean.WQLObject; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.util.Map; @@ -1085,4 +1086,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { MDC.remove(log_file_type); } } + + @Override + @Async + public void syncDemo() { + log.info("线程编号"+Thread.currentThread().getName()); + log.error("线程编号"+Thread.currentThread().getName()); + } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java index 19bed2a..3dfbd02 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java @@ -158,4 +158,20 @@ public class TaskController { String s = acsToWmsService.applyTaskToWms(device_code, container_code, height, weight); return new ResponseEntity<>(s, HttpStatus.CREATED); } + + + + @PostMapping("/Threadid") + //@PreAuthorize("@el.check('task:add')") + public ResponseEntity Threadid() { + log.info("线程编号"+Thread.currentThread().getName()); + log.error("线程编号"+Thread.currentThread().getName()); + Thread thread = new Thread(() -> { + log.info("线程编号"+Thread.currentThread().getName()); + log.error("线程编号"+Thread.currentThread().getName()); + }); + thread.start(); + acsToWmsService.syncDemo(); + return new ResponseEntity<>(HttpStatus.CREATED); + } } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/common/utils/StringUtils.java b/acs/nladmin-system/src/main/java/org/nl/modules/common/utils/StringUtils.java index 269c7f5..a10336e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/common/utils/StringUtils.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/common/utils/StringUtils.java @@ -21,8 +21,6 @@ import cn.hutool.json.JSONUtil; import lombok.extern.slf4j.Slf4j; import net.dreamlu.mica.ip2region.core.Ip2regionSearcher; import net.dreamlu.mica.ip2region.core.IpInfo; -import nl.basjes.parse.useragent.UserAgent; -import nl.basjes.parse.useragent.UserAgentAnalyzer; import org.nl.modules.common.config.ElAdminProperties; import org.nl.modules.wql.util.SpringContextHolder; @@ -50,13 +48,6 @@ public class StringUtils { private final static Ip2regionSearcher IP_SEARCHER = SpringContextHolder.getBean(Ip2regionSearcher.class); - private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer - .newBuilder() - .hideMatcherLoadStats() - .withCache(10000) - .withField(UserAgent.AGENT_NAME_VERSION) - .build(); - /** * 驼峰命名法工具 * @@ -212,8 +203,7 @@ public class StringUtils { } public static String getBrowser(HttpServletRequest request) { - UserAgent.ImmutableUserAgent userAgent = USER_AGENT_ANALYZER.parse(request.getHeader("User-Agent")); - return userAgent.get(UserAgent.AGENT_NAME_VERSION).getValue(); + return "default"; } /** diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java b/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java index e372c73..122f61f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/logging/aspect/LogAspect.java @@ -75,14 +75,6 @@ public class LogAspect { */ @Around("logPointcut()") public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { - MethodSignature signature = (MethodSignature) joinPoint.getSignature(); - Method method = signature.getMethod(); - // 方法路径 - String methodName = joinPoint.getTarget().getClass().getName() + "." + signature.getName() + "()"; - String params=getParameter(method, joinPoint.getArgs()); -// log.info("请求方法:{}",methodName); -// log.info("请求方法参数:{}",params); - Object result; currentTime.set(System.currentTimeMillis()); result = joinPoint.proceed(); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/logging/service/impl/LogServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/logging/service/impl/LogServiceImpl.java index caaffdd..957b802 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/logging/service/impl/LogServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/logging/service/impl/LogServiceImpl.java @@ -35,6 +35,7 @@ import org.nl.modules.logging.service.mapstruct.LogErrorMapper; import org.nl.modules.logging.service.mapstruct.LogSmallMapper; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestBody; @@ -81,13 +82,11 @@ public class LogServiceImpl implements LogService { } @Override - @Transactional(rollbackFor = Exception.class) + @Async public void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, Log logDto) { - MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.getMethod(); org.nl.modules.logging.annotation.Log aopLog = method.getAnnotation(org.nl.modules.logging.annotation.Log.class); - // 方法路径 String methodName = joinPoint.getTarget().getClass().getName() + "." + signature.getName() + "()"; diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/AsyncLuceneAppender.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/AsyncLuceneAppender.java new file mode 100644 index 0000000..8c24db6 --- /dev/null +++ b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/AsyncLuceneAppender.java @@ -0,0 +1,34 @@ +package org.nl.modules.lucene.common; +/** + * @author ldjun + * @version 1.0 + * @date 2023年08月24日 13:00 + * @desc desc + */ + +import ch.qos.logback.classic.spi.ILoggingEvent; +import com.yomahub.tlog.core.context.AspectLogContext; +import com.yomahub.tlog.core.enhance.logback.async.AspectLogbackAsyncAppender; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.MDC; + +import java.util.Map; + +public class AsyncLuceneAppender extends AspectLogbackAsyncAppender { + + + @Override + protected void append(ILoggingEvent event) { + String traceId = AspectLogContext.getLogValue(); + if (StringUtils.isNotEmpty(traceId)){ + MDC.put("traceId",traceId); + Map mdcPropertyMap = event.getMDCPropertyMap(); + if (mdcPropertyMap.getClass().getName().contains("SynchronizedMap")){ + mdcPropertyMap.put("traceId",traceId); + } + MDC.clear(); + } + super.append(event); + } + +} diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneAppender.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneAppender.java index 56dd6ca..b492362 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneAppender.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneAppender.java @@ -60,20 +60,17 @@ public class LuceneAppender extends AppenderBase { String message = event.getFormattedMessage(); try { LuceneLogDto luceneLogDto = JSONObject.parseObject(message, LuceneLogDto.class); - -// LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), -// String.valueOf(itemDto.getHis_item_value()), String.valueOf(itemDto.getItem_value())); -// luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc()); - //IndexWriter indexWriter = LuceneIndexWriter.getIndexWriter(); - //创建一个Document对象 Document document = new Document(); try { - //记录索引开始时间 - long startTime = System.currentTimeMillis(); //向document对象中添加域。 + Map mdcPropertyMap = event.getMDCPropertyMap(); + String traceId = mdcPropertyMap.get("traceId"); + System.out.println("---追踪号---"+traceId); + if (ObjectUtil.isNotEmpty(traceId)) { + document.add(new StringField("trace_id", traceId, Field.Store.YES)); + } if (ObjectUtil.isNotEmpty(luceneLogDto.getDevice_code())) { document.add(new StringField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES)); -// document.add(new TextField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES)); } if (ObjectUtil.isNotEmpty(luceneLogDto.getContent())) { document.add(new StringField("fieldContent", luceneLogDto.getContent(), Field.Store.YES)); @@ -93,9 +90,6 @@ public class LuceneAppender extends AppenderBase { document.add(new StringField("logType", luceneLogDto.getLogType(), Field.Store.YES)); document.add(new StringField("logTime", DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS"), Field.Store.YES)); document.add(new NumericDocValuesField("logTime",System.currentTimeMillis()));//排序 - //记录索引结束时间 - long endTime = System.currentTimeMillis(); - // log.info("建立索引共耗时{}毫秒", endTime - startTime); try { indexWriter.addDocument(document); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneIndexWriter.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneIndexWriter.java deleted file mode 100644 index c37e2f5..0000000 --- a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/LuceneIndexWriter.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.nl.modules.lucene.common; - -import cn.hutool.core.date.DateUtil; -import org.apache.lucene.index.CorruptIndexException; -import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.IndexWriterConfig; -import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; -import org.nl.modules.lucene.config.UrlConfig; -import org.wltea.analyzer.lucene.IKAnalyzer; - -import java.io.File; -import java.io.IOException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class LuceneIndexWriter { -// private static IndexWriter indexWriter; -// -// static { -// try { -// Directory directory = FSDirectory.open(new File(UrlConfig.luceneUrl).toPath()); -// IndexWriterConfig config = new IndexWriterConfig(new IKAnalyzer()); -// indexWriter = new IndexWriter(directory, config); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// /**当当前线程结束时,自动关闭IndexWriter,使用Runtime对象*/ -// Runtime.getRuntime().addShutdownHook(new Thread(){ -// @Override -// public void run() { -// try { -// closeIndexWriter(); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// } -// }); -// } -// /**在线程结束时,自动关闭IndexWriter*/ -// public static IndexWriter getIndexWriter() { -// return indexWriter; -// } -// /**关闭IndexWriter -// * @throws IOException -// * @throws CorruptIndexException */ -// public static void closeIndexWriter() throws Exception { -// if(indexWriter != null) { -// indexWriter.close(); -// } -// } -// -// public static void main(String[] args) throws IOException { -// indexWriter.deleteAll(); -// } -// - public static String getDate(String timeString) throws ParseException { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");//时间格式 - Date date = sdf.parse(timeString); - timeString = DateUtil.format(date, "yyyy-MM-dd HH:mm:ss.SSS");//格式化后的时间 - return timeString; - } - -} diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/Searcher.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/Searcher.java index 9cd0af2..b81cb6f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/Searcher.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/common/Searcher.java @@ -18,10 +18,9 @@ import org.apache.lucene.util.BytesRef; import org.wltea.analyzer.lucene.IKAnalyzer; import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.List; -import java.util.Map; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; /** * lucene查询器 @@ -33,41 +32,27 @@ public class Searcher { //获取要查询的路径,也就是索引所在的位置 Directory dir = FSDirectory.open(Paths.get(indexDir)); IndexReader reader = DirectoryReader.open(dir); - //构建IndexSearcher IndexSearcher searcher = new IndexSearcher(reader); - //标准分词器,会自动去掉空格啊,is a the等单词 - Analyzer analyzer = new IKAnalyzer(true); -// Analyzer analyzer = new StandardAnalyzer(); -// Analyzer analyzer = new IKAnalyzer(false); - //查询解析器 -// QueryParser queryParser = new QueryParser("fieldContent", analyzer); - - //记录索引开始时间 - long startTime = System.currentTimeMillis(); // 实际上Lucene本身不支持分页。因此我们需要自己进行逻辑分页。我们要准备分页参数: int pageSize = Integer.parseInt(whereJson.get("size").toString());// 每页条数 int pageNum = Integer.parseInt(whereJson.get("page").toString());// 当前页码 - int start = pageNum * pageSize;// 当前页的起始条数 - int end = start + pageSize;// 当前页的结束条数(不能包含) - // 创建排序对象,需要排序字段SortField,参数:字段的名称、字段的类型、是否反转如果是false,升序。true降序 - Sort sort = new Sort(new SortField("logTime", SortField.Type.LONG,true)); - TopDocs docs = null; BooleanQuery.Builder booleanQueryBuilder = new BooleanQuery.Builder(); //时间范围查询 String startDate = (String) whereJson.get("begin_time"); String endDate = (String) whereJson.get("end_time"); - Calendar calendar=Calendar.getInstance(); - calendar.set(1970, 0, 1); + if (startDate == null){ + Calendar calendar=Calendar.getInstance(); + calendar.set(1970, 0, 1); startDate = DateUtil.format(calendar.getTime(),"yyyy-MM-dd HH:mm:ss.SSS"); }else{ - startDate = LuceneIndexWriter.getDate(startDate); + startDate = getDate(startDate); } if (endDate == null){ endDate = DateUtil.format(new DateTime(),"yyyy-MM-dd HH:mm:ss.SSS"); } else { - endDate = LuceneIndexWriter.getDate(endDate); + endDate = getDate(endDate); } TermRangeQuery termRangeQuery = new TermRangeQuery("logTime", new BytesRef(startDate), new BytesRef(endDate), true, true); booleanQueryBuilder.add(termRangeQuery,BooleanClause.Occur.MUST); @@ -95,18 +80,15 @@ public class Searcher { WildcardQuery query = new WildcardQuery(new Term("fieldContent", "*"+(String) whereJson.get("blurry")+"*")); booleanQueryBuilder.add(query, BooleanClause.Occur.MUST); } - docs = searcher.search(booleanQueryBuilder.build(), end,sort); - //记录索引时间 - long endTime = System.currentTimeMillis(); - log.info("匹配{}共耗时{}毫秒",booleanQueryBuilder.build(),(endTime-startTime)); - log.info("查询到{}条日志文件", docs.totalHits.value); - List list = new ArrayList<>(); - ScoreDoc[] scoreDocs = docs.scoreDocs; - if (end > docs.totalHits.value) end = (int) docs.totalHits.value; - JSONArray array = new JSONArray(); - for (int i = start; i < end; i++) { - ScoreDoc scoreDoc = scoreDocs[i]; + TopFieldCollector collector = TopFieldCollector.create(new Sort(new SortField("logTime", SortField.Type.LONG,true)), 20000, 0); + searcher.search(booleanQueryBuilder.build(), collector); + TopDocs topDocs = collector.topDocs(pageNum*pageSize, pageSize); + int totalSize = collector.getTotalHits(); + ScoreDoc[] scoreDocs = topDocs.scoreDocs; + + List list = new ArrayList<>(); + for (ScoreDoc scoreDoc : scoreDocs) { Document doc = reader.document(scoreDoc.doc); JSONObject object = new JSONObject(); object.put("content",doc.get("fieldContent")); @@ -117,28 +99,21 @@ public class Searcher { object.put("requestparam",doc.get("requestparam")); object.put("responseparam",doc.get("responseparam")); if(doc.get("fieldContent") != null) { - array.add(object); + list.add(object); } } - for(Object logDto:array){ - log.info(logDto.toString()); - } reader.close(); + dir.close(); JSONObject jo = new JSONObject(); - jo.put("content", array); - jo.put("totalElements", docs.totalHits.value); + jo.put("content", list); + jo.put("totalElements", totalSize); return jo; } - public static void main(String[] args) { - String indexDir = "D:\\lucene\\index"; - //查询这个字符串 - String q = "07.832"; - Map whereJson = null; - try { - search(indexDir, q,whereJson); - } catch (Exception e) { - e.printStackTrace(); - } + public static String getDate(String timeString) throws ParseException { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");//时间格式 + Date date = sdf.parse(timeString); + timeString = DateUtil.format(date, "yyyy-MM-dd HH:mm:ss.SSS");//格式化后的时间 + return timeString; } } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java index 70619e6..c377ebe 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java @@ -7,20 +7,12 @@ import com.alibaba.fastjson.JSON; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; -import org.apache.lucene.document.StringField; -import org.apache.lucene.document.TextField; -import org.apache.lucene.index.IndexWriter; -import org.nl.modules.lucene.common.LuceneIndexWriter; import org.nl.modules.lucene.enums.LogTypeEnum; import org.nl.modules.lucene.service.LuceneExecuteLogService; import org.nl.modules.lucene.service.dto.LuceneLogDto; import org.slf4j.MDC; import org.springframework.stereotype.Service; -import java.io.IOException; - /** * @author jlm * @description 服务实现 @@ -45,50 +37,9 @@ public class LuceneExecuteLogServiceImpl implements LuceneExecuteLogService { @Override public void interfaceExecuteLog(LuceneLogDto luceneLogDto) { luceneLogDto.setLogType(LogTypeEnum.INTERFACE_LOG.getDesc()); -// addIndex(luceneLogDto); log.info("{}", JSON.toJSONString(luceneLogDto)); } - private void addIndex(LuceneLogDto luceneLogDto) { -// IndexWriter indexWriter = LuceneIndexWriter.getIndexWriter(); -// //创建一个Document对象 -// Document document = new Document(); -// try { -// //记录索引开始时间 -// long startTime = System.currentTimeMillis(); -// //向document对象中添加域。 -// if (ObjectUtil.isNotEmpty(luceneLogDto.getDevice_code())) { -// document.add(new StringField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES)); -//// document.add(new TextField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES)); -// } -// if (ObjectUtil.isNotEmpty(luceneLogDto.getContent())) { -// document.add(new StringField("fieldContent", luceneLogDto.getContent(), Field.Store.YES)); -// } -// if (ObjectUtil.isNotEmpty(luceneLogDto.getMethod())) { -// document.add(new StringField("method", luceneLogDto.getMethod(), Field.Store.YES)); -// } -// if (ObjectUtil.isNotEmpty(luceneLogDto.getStatus_code())) { -// document.add(new StringField("status_code", luceneLogDto.getStatus_code(), Field.Store.YES)); -// } -// if (ObjectUtil.isNotEmpty(luceneLogDto.getRequestparam())) { -// document.add(new StringField("requestparam", luceneLogDto.getRequestparam(), Field.Store.YES)); -// } -// if (ObjectUtil.isNotEmpty(luceneLogDto.getResponseparam())) { -// document.add(new StringField("responseparam", luceneLogDto.getResponseparam(), Field.Store.YES)); -// } -// document.add(new StringField("logType", luceneLogDto.getLogType(), Field.Store.YES)); -// document.add(new StringField("logTime", DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS"), Field.Store.YES)); -// indexWriter.addDocument(document); -// //记录索引结束时间 -// long endTime = System.currentTimeMillis(); -// log.info("建立索引共耗时{}毫秒", endTime - startTime); -// indexWriter.commit(); -// MDC.put("DEVICECODE", luceneLogDto.getDevice_code()); -// } catch (Exception e) { -// log.error(e.getMessage(), e); -// } - } - @Override public void extLog(String name, String message) { try { diff --git a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml b/acs/nladmin-system/src/main/resources/log/AcsToWms.xml index df3efa3..e3182fb 100644 --- a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml +++ b/acs/nladmin-system/src/main/resources/log/AcsToWms.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -19,15 +19,14 @@ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n ${log.charset} - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml b/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml index f4629cd..5ea9f1d 100644 --- a/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml +++ b/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -21,13 +21,12 @@ - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml b/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml index 1ac8de4..46daf98 100644 --- a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml +++ b/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -21,13 +21,12 @@ - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml b/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml index 6920f4f..436236e 100644 --- a/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml +++ b/acs/nladmin-system/src/main/resources/log/LnshRGVDeviceDriver.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -21,13 +21,12 @@ - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/Lucene.xml b/acs/nladmin-system/src/main/resources/log/Lucene.xml deleted file mode 100644 index f00bdbd..0000000 --- a/acs/nladmin-system/src/main/resources/log/Lucene.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - ${LOG_HOME}/lucene/${DEVICECODE}/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - 512 - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/NDCAgvServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/NDCAgvServiceImpl.xml index a10d776..402e64a 100644 --- a/acs/nladmin-system/src/main/resources/log/NDCAgvServiceImpl.xml +++ b/acs/nladmin-system/src/main/resources/log/NDCAgvServiceImpl.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -22,12 +22,12 @@ - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/NDCSocketConnectionAutoRun.xml b/acs/nladmin-system/src/main/resources/log/NDCSocketConnectionAutoRun.xml index 53bcb88..4b8a81a 100644 --- a/acs/nladmin-system/src/main/resources/log/NDCSocketConnectionAutoRun.xml +++ b/acs/nladmin-system/src/main/resources/log/NDCSocketConnectionAutoRun.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -21,13 +21,12 @@ - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml b/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml index e5d9847..393d6dc 100644 --- a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml +++ b/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml @@ -10,7 +10,7 @@ 15 - 200MB + 100MB 2GB @@ -21,13 +21,12 @@ - - - - - - + + + + 512 + + + diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index df3d92d..155cde0 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -25,7 +25,6 @@ https://juejin.cn/post/6844903775631572999 - @@ -45,7 +44,7 @@ https://juejin.cn/post/6844903775631572999 15 - 200MB + 100MB 20GB @@ -63,72 +62,19 @@ https://juejin.cn/post/6844903775631572999 - + 512 - - 1000 - - ${LOKI_URL}/push - - - - - ${log.pattern} - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -138,54 +84,14 @@ https://juejin.cn/post/6844903775631572999 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +