我正在尝试将此log4j2示例用于流跟踪。 https://logging.apache.org/log4j/2.x/manual/flowtracing.html
我的日食抱怨JsonMessage无法解析为一种类型。
在我的pom.xml中,我具有依赖项
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
当我在项目的Eclipse / Maven Dependencies部分中浏览log4j-api-2.11.0.jar时,在org.apache.logging.log4j.message包中找不到JsonMessage.class。
我上网查看JsonMessage是否在github源控件https://github.com/apache/logging-log4j2/blob/master/log4j-api/src/test/java/org/apache/logging/log4j/message/JsonMessage.java中,并且在那里。
我该怎么做才能将JsonMessage引入我的项目并获取示例来构建和运行?