log4j2elastic
<!-- https://mvnrepository.com/artifact/net.inemar.utility/log4j2elastic -->
<dependency>
<groupId>net.inemar.utility</groupId>
<artifactId>log4j2elastic</artifactId>
<version>3.1.0</version>
</dependency>
log4j2配置
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="MyApp" packages="">
<Appenders>
<Console name="Console" target="SYSTEM_OUT" ignoreExceptions="false">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] (%F:%L) - %m%n" />
</Console>
<ElasticAppender name="ElasticAppender" manager="true"/>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="ElasticAppender" level="error" />
</Root>
</Loggers>
</Configuration>
配置环境变量
elastic_local = native://192.168.99.100:9300
elastic_cluster = elasticsearch
service = demo-service
kibana查看
默认logstash-*查看
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。