Commit 7a37a46e authored by Quxl's avatar Quxl

x

parent f59a61a3
...@@ -35,6 +35,9 @@ public class AliyunLogProducer { ...@@ -35,6 +35,9 @@ public class AliyunLogProducer {
@Value("${logProducer.isOpen}") @Value("${logProducer.isOpen}")
private Boolean isOpen; private Boolean isOpen;
@Value("${logProducer.logName}")
private String logName;
private static final ExecutorService EXECUTOR_SERVICE = Executors.newCachedThreadPool(); private static final ExecutorService EXECUTOR_SERVICE = Executors.newCachedThreadPool();
...@@ -46,7 +49,7 @@ public class AliyunLogProducer { ...@@ -46,7 +49,7 @@ public class AliyunLogProducer {
List<LogItem> logItems = new ArrayList<LogItem>(); List<LogItem> logItems = new ArrayList<LogItem>();
LogItem logItem = new LogItem(); LogItem logItem = new LogItem();
logItem.PushBack("id", String.valueOf(System.currentTimeMillis())); logItem.PushBack("id", String.valueOf(System.currentTimeMillis()));
logItem.PushBack("AST_SHOP_ERROR_LOG", logText); logItem.PushBack(logName, logText);
logItems.add(logItem); logItems.add(logItem);
ListenableFuture<Result> future = producer.send(project, logStore, logItems); ListenableFuture<Result> future = producer.send(project, logStore, logItems);
Futures.addCallback(future, new SampleFutureCallback(project, logStore, logText), EXECUTOR_SERVICE); Futures.addCallback(future, new SampleFutureCallback(project, logStore, logText), EXECUTOR_SERVICE);
......
...@@ -13,6 +13,7 @@ solr.goods.cron-for-day: 0 0 3 * * ? ...@@ -13,6 +13,7 @@ solr.goods.cron-for-day: 0 0 3 * * ?
solr.goods.cron-for-minute: 0 * * * * ? solr.goods.cron-for-minute: 0 * * * * ?
solr.baseURL=http://10.10.0.15:8983/solr/goods solr.baseURL=http://10.10.0.15:8983/solr/goods
logProducer.logName=AST_SHOP_ERROR_LOG
logProducer.isOpen=false logProducer.isOpen=false
logProducer.project=linkfernlog logProducer.project=linkfernlog
logProducer.logStore=linkfernlogstore logProducer.logStore=linkfernlogstore
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment