以下是log4j 1.x中使用的示例。我沒有得到任何例子來轉換在log4j2相同。如何在log4j2中使用org.perf4j.log4j.AsyncCoalescingStatisticsAppender?
<appender name="CoalescingStatisticsAppender"
class="org.perf4j.log4j.AsyncCoalescingStatisticsAppender">
<!--
The TimeSlice option is used to determine the time window for which
all received StopWatch logs are aggregated to create a single
GroupedTimingStatistics log. Here we set it to 10 seconds, overriding
the default of 30000 ms
-->
<param name="TimeSlice" value="30000" />
<appender-ref ref="perf4jFileAppender" />
</appender>
你能解釋我該怎麼寫嗎? –