[logback-dev] [JIRA] Created: (LBCORE-252) Logback groovy configuration add support for Perf4j

Muyen Lee (JIRA) noreply-jira at qos.ch
Fri Apr 20 04:47:27 CEST 2012

Logback groovy configuration add support for Perf4j 

                 Key: LBCORE-252
                 URL: http://jira.qos.ch/browse/LBCORE-252
             Project: logback-core
          Issue Type: Improvement
          Components: Appender
            Reporter: Muyen Lee
            Assignee: Logback dev list
            Priority: Minor

I want to add an AsyncCoalescingStatisticsAppender. The XML confugration looks like this.

<appender name="CoalescingStatistics" class="org.perf4j.logback.AsyncCoalescingStatisticsAppender">
        <param name="TimeSlice" value="60000"/>
        <appender-ref ref="graphExecutionTimes"/>
        <appender-ref ref="graphExecutionTPS"/>
        <!-- We add the JMX Appender reference onto the CoalescingStatistics -->
        <appender-ref ref="perf4jJmxAppender"/>

logback.groovy's appender function doesn't support <appender-ref ref="perf4jJmxAppender"/>

The workaround is to write groovy directly

JmxAttributeStatisticsAppender jmxAppender = new JmxAttributeStatisticsAppender()
jmxAppender.name = "Per4j"
jmxAppender.context = context
jmxAppender.tagNamesToExpose="tag1, tag2"

AsyncCoalescingStatisticsAppender coalAppender = new AsyncCoalescingStatisticsAppender()
// in millisecond
coalAppender.name = "CoalescingStatistics"
coalAppender.context = context

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list