目前我有以下日志输出。
{"@timestamp":"2020-11-25T11:48:10.443Z", "log.level":"ERROR", "message":"Hallo ", "service.name":"vehicles","event.dataset":"null","process.thread.name":"http-thread-pool::http-listener-1(2)","log.logger":"boundary.MonitoringResource","short.trace.id":"49dcb8d1","trace.id":"49dcb8d1.VEH.UnknownHost-7304"}
我想要相同的输出,但没有event.dataset。
下面是我的log4j配置:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" monitorInterval="1">
<Appenders>
<Console name="EcsSystemLogsAppender" target="SYSTEM_OUT">
<EcsLayout serviceName="vehicles" stackTraceAsArray="true" eventDataset="nullString"></EcsLayout>
</Console>
</Appenders>
<Loggers>
<Logger name="vehicles" level="error" additivity="false">
<AppenderRef ref="EcsSystemLogsAppender"/>
</Logger>
</Loggers>
</Configuration>
暂无答案!
目前还没有任何答案,快来回答吧!